Skip to content

Add headless agent control mode#345

Open
maceip wants to merge 1 commit into
antirez:mainfrom
maceip:agent-control
Open

Add headless agent control mode#345
maceip wants to merge 1 commit into
antirez:mainfrom
maceip:agent-control

Conversation

@maceip
Copy link
Copy Markdown

@maceip maceip commented Jun 6, 2026

this adds --agent-control, a third way to run ds4-agent between the tui and plain --non-interactive

plain --non-interactive is good for prompt pipes, but it cannot drive the agent session lifecycle. supervisors need /save, /switch, and clean exit without pretending to be a terminal

it keeps normal prompt submission on stdin, but makes stdin line-delimited so lines starting with / can control the agent session without terminal emulation

🔶 supports /save, /list, /switch, /new, /quit, and /exit
🔶 keeps plain input lines as user prompts
🔶 refuses /switch or /new when session state is dirty, so callers must /save first

this is meant as a small step toward a native agent session api: fast project and cwd switching, exact kv resume when possible, structured trace and lifecycle events, and remote workspace clients that still keep ds4 in control of the live session

validated locally with make ds4-agent, git diff --check, ./ds4-agent --help, and the --agent-control / -p parser rejection path

@maceip
Copy link
Copy Markdown
Author

maceip commented Jun 6, 2026

this was made baby-sized to pass review -- if you are considering something heavy like ACP or want more than a line-buffered mode with /save lmk

@maceip maceip closed this Jun 6, 2026
@maceip maceip reopened this Jun 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant