Inspiration We are two people, and each of us builds through a coding agent. Each agent hears only from its own developer. So one agent builds an API that returns total_cents, another builds a page that reads total, and nobody notices until the branches are merged.

The worse case is when nothing crashes. In one of our test runs, two developers gave their agents different rules for a cancelled booking. Both agents built what they were told, and the revenue report printed 940 where the right number was 686. No test failed. That number would have shipped.

A plan written at the start doesn't prevent this, because the trouble arrives later: the lead changes a requirement, or a developer tells their own agent something the others never hear. We wanted something that keeps agents aligned while they are working, in mid-flight.

What it does Midflight is a hosted service that a team's coding agents talk to while they work. It does four things:

Claim. Before writing code, an agent says what it will build, which interfaces it provides or reads, and what it is assuming about other people's tasks. Check. Midflight compares the claim with the team's plan and with the other agents' claims, and answers in the same call: approved, or exactly what to fix ("read total_cents: integer, not total"). Propagate. When the lead changes the plan, only the agents whose tasks are affected get an update. The rest keep working. Verify. After a push, Midflight checks the real commit and its test results and posts a midflight/verify check on the pull request. Midflight settles technical questions between two agents itself, such as a field name or who provides a function, and the lead can overturn its answer. A product question, such as a fee or a refund, goes to the human lead with both sides and a suggested answer. Midflight never picks a winner there.

A team installs nothing. The lead installs our GitHub App on the repository and adds one connector URL to their AI client. Teammates add the same URL, sign in with GitHub, and join with a code. It works from Claude Code, Claude, ChatGPT, and Codex.

How we built it Connector: a FastAPI server that serves a remote MCP endpoint, Sign in with GitHub (OAuth), and a REST API. It runs as an AWS Lambda behind a Function URL. State: DynamoDB, with conditional writes and transactions. A claim and its review job are saved in one write, and the DynamoDB stream hands the job to a worker Lambda, so accepted work can't be lost. Failed jobs go to an SQS dead-letter queue. Review: explicit rules run first (references, contract fields and types, plan versions). Then an AI reviewer on Amazon Bedrock (Amazon Nova 2 Lite, through the Converse API with one forced tool) looks for conflicts in meaning. The model only proposes findings. Application code validates them and decides, so a bad model reply can never approve anything. GitHub: one GitHub App reads commits and CI results and publishes the check. An optional pre-push hook stops a push Midflight isn't ready for. Infrastructure: AWS SAM, with Secrets Manager, IAM, and CloudWatch. Every external service sits behind an interface with a fake, so the whole system runs and tests on a laptop.

Challenges we ran into You can't interrupt a busy agent. So the agent comes to Midflight: it plans its own checkpoints and calls check_in at each one. A directive waits there until the agent arrives. Our first benchmark went against us. We ran Midflight against a plain shared chat file, and the chat file won both cases. Midflight's AI reviewer raised 13 escalations and 9 were false alarms, each one stopping an agent. Midflight was expensive in a way we didn't expect. The cost wasn't the number of calls. It was the length of the replies, because an agent reads its whole conversation again on every step. AWS limits. API Gateway's 30-second limit was shorter than our 60-second claim review, so we moved to a Lambda Function URL. Our new account's limit of 10 concurrent Lambdas, together with a request that hung for two minutes, left agents starting without their tools. Bedrock refused every model on our new account, so the reviewer assumes a role in a teammate's account. Accomplishments that we're proud of It is live. One URL, sign in with GitHub, join with a code. We tested our own product against the simplest alternative and published the loss, with every prompt, reply, and check in the repository. Then we fixed what the loss showed and ran it again. On the same five-agent case, Midflight went from 13 of 14 checks to 14 of 14. The lead was interrupted once where it had been four times, and false alarms went from seven to none. On PigeonPost, a six-agent case we built around things that happen after the plan is written, Midflight was the only approach to pass all 20 checks at merge. With no channel 13 passed, and with the chat file 18. This case is Midflight's home ground by design, and we say so next to the numbers. The reviewer got much quieter without missing more. On recorded cases it still blocked 20 of 20 real conflicts, and wrongly blocked 1 of 45 where it had wrongly blocked 13. What we learned Capable agents with a clear brief already agree on most things. What a brief can't do is answer a question that comes up later, or reach a person. Rework is cheap and coordination is not. A repair round cost us between $0.12 and $0.33. Midflight costs the most in every case we ran, and on the two cases we ran again after our fixes it still costs 22% to 25% more than the chat file. It earns that only where a mistake is hard to find. Ask a model one narrow question at a time. Rewording one big review prompt made it worse. A second call that asks only "do these two statements answer the same question differently?" removed almost all the false alarms. Everything you send an agent, it reads again on every step. Saying each thing once cut the text Midflight sends by about a quarter. Measure against the simplest thing that could work, and do it before the demo. What's next for Midflight Repeat every trial, with real teammates on separate machines. Each result so far is one run. Tell the lead when a question is waiting, where today they have to look. Let contracts describe routes and functions, not only data fields. Move the reviewer to Claude on Bedrock and measure it on cases it hasn't seen. Find the last cause of agents starting without their tools. List Midflight in the connector directories, so joining is one click.

Built With

  • amazon-bedrock
  • amazon-cloudwatch
  • amazon-dynamodb
  • amazon-sqs
  • aws-lambda
  • aws-sam
  • aws-secrets-manager
  • boto3
  • dynamodb-streams
  • fastapi
  • github-actions
  • github-api
  • github-apps
  • model-context-protocol-(mcp)
  • oauth-2.0
  • pydantic
  • pytest
  • python
Share this project:

Updates

Submission history