Skip to content

Commit 4c01055

Browse files
committed
docs(sdk): document confirmation_inheritance in Node and Python SDK READMEs
Adds documentation for the new confirmation_inheritance field in both Node and Python SDK READMEs, explaining the three modes: - auto_approve (default): child runs auto-approve all Ask decisions - deny_on_ask: child runs fail immediately on Ask - inherit_parent: child runs inherit parent's confirmation policy Includes code examples showing how to configure worker agents with different confirmation inheritance modes for both SDKs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 24cd0a9 commit 4c01055

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

sdk/node/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ const session = agent.session('/my-project', {
135135
model: 'openai/gpt-4o',
136136
maxSteps: 24,
137137
prompt: 'Keep patches focused and run the narrowest relevant check.',
138+
confirmationInheritance: 'auto_approve', // child runs auto-approve Ask decisions
138139
},
139140
{ name: 'review-cow', description: 'Adversarial review', kind: 'reviewer' },
140141
],
@@ -159,6 +160,27 @@ session.registerWorkerAgent({
159160

160161
For a worker as the top-level actor, use `agent.sessionForWorker(workspace, spec)`.
161162

163+
### Confirmation Inheritance
164+
165+
Control how child runs resolve Ask decisions with `confirmationInheritance`:
166+
167+
- `'auto_approve'` (default): Child runs auto-approve all Ask decisions
168+
- `'deny_on_ask'`: Child runs fail immediately when encountering an Ask
169+
- `'inherit_parent'`: Child runs inherit the parent's confirmation policy
170+
171+
```js
172+
const session = agent.session('/my-project', {
173+
workerAgents: [
174+
{
175+
name: 'restricted-writer',
176+
description: 'Write files with parent confirmation',
177+
kind: 'implementer',
178+
confirmationInheritance: 'inherit_parent', // requires parent approval
179+
},
180+
],
181+
})
182+
```
183+
162184
## AHP-Supervised Advice
163185

164186
Background advice belongs in the host or AHP harness. A3S Code forwards hooks,

sdk/python/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ frontend = WorkerAgentSpec.implementer("frontend-cow", "Small verified frontend
135135
frontend.model = "openai/gpt-4o"
136136
frontend.max_steps = 24
137137
frontend.prompt = "Keep patches focused and run the narrowest relevant check."
138+
frontend.confirmation_inheritance = "auto_approve" # child runs auto-approve Ask decisions
138139
opts.add_worker_agent(frontend)
139140
session = agent.session("/my-project", opts)
140141
session.task({
@@ -143,6 +144,14 @@ session.task({
143144
"prompt": "Find and fix the loading-state regression, then summarize verification.",
144145
})
145146

147+
# Confirmation inheritance controls how child runs resolve Ask decisions:
148+
# - "auto_approve" (default): Child runs auto-approve all Ask decisions
149+
# - "deny_on_ask": Child runs fail immediately when encountering an Ask
150+
# - "inherit_parent": Child runs inherit the parent's confirmation policy
151+
restricted = WorkerAgentSpec("restricted-writer", "Write files with parent confirmation", "implementer")
152+
restricted.confirmation_inheritance = "inherit_parent" # requires parent approval
153+
opts.add_worker_agent(restricted)
154+
146155
# Object-shaped direct tools
147156
session.git({"command": "status"})
148157
session.git({"command": "worktree", "subcommand": "list"})

0 commit comments

Comments
 (0)