Skip to content

refactor(agent): Claude behind an Agent trait for launch and input (A1a) - #241

Merged
httpsphl merged 1 commit into
mainfrom
refactor/agent-launch
Oct 9, 2026
Merged

httpsphl merged 1 commit into
mainfrom
refactor/agent-launch

Conversation

@httpsphl

@httpsphl httpsphl commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Slice A1a of spec 30. New agent module: an Agent trait (args, extra_env, encode_turn), ClaudeAgent, and agent::of(kind) (None for codex/agy until A2/A3).

  • supervisor/spawn.rs builds the command line through the agent instead of hard-coding Claude's flags.
  • courier/render.rs builds a neutral Turn (text and encoded images) and the agent writes the stdin line.
  • No behavior change: same flags, same environment, same stdin line. The existing tests pass untouched, plus unit tests for the arguments and the turn line.

Next: A1b (reading the output as normalized events), A1c (discovery and login, workspace files, approvals).

fmt, clippy -D warnings and cargo test --workspace pass.

The process arguments, the extra environment and the encoding of a turn on
stdin move from the supervisor and the courier into agent::ClaudeAgent;
those two call agent::of(bot.agent). No change for Claude bots.
@httpsphl
httpsphl merged commit ffa574f into main Oct 9, 2026
4 checks passed
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