Repository navigation
feat: the Boat adapter's start script and the coordinator's first turn - #56
Merged
Merged
Conversation
The sandbox gets a start script (`--setup-file`) that installs the pinned kontext release with install.sh, sets the project up from the server with the token file (`kontext clone --server`, retried while the server is not reachable), removes the token file on every way out, waits for the repo's clone and runs `kontext install --local` there, with what it writes kept out of git through info/exclude. Dispatch waits for `setupStatus` (20 minutes at most), then prompts the coordinator (claude, opus-5-5 by default) in a detached process that holds `boat prompt` open, saves the conversation id and leaves how the turn ended in a file. `turn_state` is the one function that says whether a turn ended; a turn that cannot be followed to its end is lost, never ended. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OmarAlex24
force-pushed
the
dispatch/boat-adapter
branch
from
November 16, 2026 22:53
8deaf0c to
509bcdd
Compare
6 tasks done
OmarAlex24
marked this pull request as ready for review
November 17, 2026 14:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second of the
kontext dispatchstack: the Boat adapter's start script and the coordinator's first turn.What changed and why
src/dispatch/script.rs, passed withboat new --setup-file). It holds no secret and never echoes a command.install.shat the pinned release ([dispatch] kontext_version, default this binary's version), unless that version is already there.KONTEXT_TOKEN="$(cat <token file>)" kontext clone --server …, retried for up to 10 minutes (the server may not be reachable yet), then removes the token file; atrapremoves it on every other way out too.kontext --role coordinator install --localthere, and adds what it wrote toinfo/excludeso it never reaches a commit.setupStatus(boat info --json) before prompting, up to 20 minutes; a failed or timed-out script stops the sandbox and revokes the token.src/dispatch/turn.rs):boat prompt --json --provider claude --model opus-5-5 --new "<prompt>"(both configurable). The prompt is short: run epic<name>following.claude/agents/kontext-coordinator.md, starting fromkontext brief <name>, until kontext has it closed; deliver it as one PR stack; ask the pm, never the user.turn_state. It is implemented by holdingboat promptopen: a hiddenkontext dispatch turn <epic> <n>process, detached in its own process group, holds a lock whileboat promptruns, saves the conversation id as soon as Boat prints it, and writesendedorlost: <why>when it returns.Departures from the brief
kontext install --localin the clone, plusinfo/exclude, so the coordinator's hooks and agent files stay out of the epic's PRs.[dispatch] repo_diris where Boat clones the repo, default/home/user/<first [[repos]] remote>; dispatch refuses when it cannot tell.boat promptfailed islost, not ended. The watcher (next PR) decides nothing from it.Test plan
cargo fmt --check,cargo clippy --all-targets -- -D warningsand the fullcargo testpassed at this commitpromptcall has the provider, model and prompt; the conversation id is saved; the turn's exit file saysendedboat promptthat exits nonzero leaves the turnlost, not endedsetupStatus: failed): the sandbox is stopped, the token revokedshin a home of its own with a fakecurlwhoseinstall.shcopies the test's binary: kontext installed, the project cloned from the local server with the token from the file, the token file removed,install --localrun in a git clone thatgit statusstill shows clean,kontext briefworks there, and a second run is idempotent'; rm -rf / #stays one quoted word🤖 Generated with Claude Code