Repository navigation
Conversation
Headless workers/stewards spawned without --prompt or --resume have no input source and exit immediately, producing the cryptic 'Session exited before init' error. Refuse the invocation with a clear message that names the cause and lists the three fixes (--prompt, --resume, --mode interactive). Refs stoneforge-ai#61.
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.
Fork-side mirror of upstream PR stoneforge-ai#100 (closes stoneforge-ai#61).
This PR exists for self-review and live server testing; the canonical review happens on the upstream PR. Will be closed when upstream stoneforge-ai#100 merges.
Summary
sf agent start <id>for a worker defaults to headless mode, which feeds prompts via stdin. Without--promptor--resumethe spawned process has no input, exits immediately, and the user seesFailed to start agent: Session exited before init.agentStartHandlernow refuses headless invocations with no input source up front and prints the cause plus the three fixes (--prompt,--resume,--mode interactive).Smoke test (verified on this branch live via the local sf wrapper)
sf agent start <worker-id>→Cannot start a headless worker without an initial prompt.exit 4sf agent start <steward-id>→ same, role correctly named "steward"sf agent start <worker-id> --mode interactive→ bypasses validation, spawn proceeds