bare agent: start the session idle and wait for the first message#61
Merged
Conversation
A promptless connect start (what a bare `agent` expands to) now sends idle_start on POST /v1/sessions: the sandbox spins up, Claude Code sits idle at the prompt, and the first thing typed into the composer opens turn 0, like a local `claude`. Previously the server fabricated a workflow kickoff whenever the resolved config carried a claude.system, so a bare `agent` on a dev-box config opened with "Carry out the workflow instructions in your system prompt." and no instructions to carry out. A promptless --watch/--detach start still runs the config's workflow; only the interactive open changes. Servers without the field ignore it and keep today's behavior.
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.
What
A promptless
--connectstart (what a bareagentexpands to) now sendsidle_start: trueonPOST /v1/sessions. The sandbox spins up, Claude Code starts idle at the prompt, and the first thing typed into the composer opens turn 0 - the same feel as launching a localclaude. Typing while the sandbox provisions already works: the message queues in the session inbox and delivers as the initial content.Why
Previously the server fabricated a workflow kickoff ("Carry out the workflow instructions in your system prompt." plus customer context and time) whenever the resolved config carried a
claude.system, so a bareagenton a dev-box config opened with a pointer at workflow instructions that did not exist.Notes
--watch/--detachstart still runs the config's workflow kickoff; only the interactive open changes.Testing
tsc --noEmitclean, vitest 236 passed. The change itself is a one-line conditional in the start action plus the request type.