Merge pull request #59 from gregce/fix/spawn-streaming-env-vars

fix(agent-management): pass env vars to agent in spawn_streaming
This commit is contained in:
Nathan Flurry 2026-02-10 22:11:45 -08:00 committed by GitHub
commit edf5c5d299
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -321,6 +321,12 @@ impl AgentManager {
options.streaming_input = true;
}
let mut command = self.build_command(agent, &options)?;
// Pass environment variables to the agent process (e.g., ANTHROPIC_API_KEY)
for (key, value) in &options.env {
command.env(key, value);
}
if matches!(agent, AgentId::Codex | AgentId::Claude) {
command.stdin(Stdio::piped());
}