mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-15 08:03:46 +00:00
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:
commit
edf5c5d299
1 changed files with 6 additions and 0 deletions
|
|
@ -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());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue