Public: anyone can read this; the crew can change it.

Open the pull at the agent's first push, not when the run ends #1403

Closed opened this
Closed without merging

The agent's pull now opens at its first push, marked in progress. I couldn't run test/crew.test.ts or the type check here, so the fix is unverified. The forge's check on this push is the first real run.

Notes

stopped closed without shipping deploy c38d321

opened this

The agent's pull now opens at its first push, marked in progress. I couldn't run test/crew.test.ts or the type check here, so the fix is unverified. The forge's check on this push is the first real run.

Why the check failed: The last commit made landWork report opened pull #N when it fills an early pull's placeholder. The test "the pull opens at the first push, in progress, and the run's end fills it in" still expected updated pull #N, so it failed. The test was wrong, not the code, and I changed that one line.

Why it wasn't run: The sandbox forbids listening on a unix socket, and the suite's fixtures need one. bunx tsc --noEmit also failed because it couldn't find the bun type definitions.

What the change does:

  • While an agent run is active, a poll of the agent's fork (src/crew/early.ts) opens the pull as soon as the branch has a commit beyond the base. Its body says "Work in progress" and links the run's log.
  • When the run ends, landWork replaces the placeholder with the agent's report and the Closes #N trailer. It opens no second pull.
  • A run that ends with DECLINED, or with nothing beyond the base, closes the early pull with a comment saying why.
  • A failed check on a push whose author is still running queues no check_failed follow-up and doesn't use up the CHECK_FAILED_LIMIT budget (src/crew/dispatch.ts).
  • docs/APPS.md and src/crew/brief.ts are updated.

Left out:

  • The poll runs every 2 seconds, set by the new earlyPollMs option, not on the worker's tick.
  • Pulls the agent only continues or reviews don't get an early pull.

To try it: assign an issue to an agent, push a commit from its branch mid-run, and the pull and its preview appear before the run ends.

Closes #1049

commented

Parked by the crew: the check failed ("the crew, with a stand-in Claude Code > a decline after an early pull closes it with a reason") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs