mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-16 13:04:11 +00:00
feat: add raw session args/opts for agent passthrough
This commit is contained in:
parent
375d73e4cb
commit
2f26f76d9b
14 changed files with 365 additions and 37 deletions
|
|
@ -62,6 +62,26 @@ await client.createSession("demo-session", {
|
|||
await client.postMessage("demo-session", { message: "Hello" });
|
||||
```
|
||||
|
||||
### Raw session arguments
|
||||
|
||||
Pass low-level arguments directly to agents at session creation:
|
||||
|
||||
```ts
|
||||
// CLI args for Claude, OpenCode, Amp (not Codex)
|
||||
await client.createSession("my-session", {
|
||||
agent: "claude",
|
||||
rawSessionArgs: ["--max-turns", "5"],
|
||||
});
|
||||
|
||||
// Options passed through agent's native protocol (long-running servers only)
|
||||
await client.createSession("my-session", {
|
||||
agent: "codex",
|
||||
rawSessionOptions: { sandbox: "workspace-write" },
|
||||
});
|
||||
```
|
||||
|
||||
Check `capabilities.rawSessionArgs` and `capabilities.rawSessionOptions` to see what each agent supports.
|
||||
|
||||
List agents and inspect feature coverage (available on `capabilities`):
|
||||
|
||||
```ts
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue