Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
`output-error` (#162, #441)
- Store a step's reasoning once, in content, so long reasoning fits the document
size limit (#418, #423)
- Fix continuing a tool approval when a context handler returns older history.
Context handlers no longer see approval requests or decisions, and pending
approvals are left out of other generations' context instead of auto-denied
(#411, #416)

## 0.7.9

Expand Down
19 changes: 9 additions & 10 deletions docs/tool-approval.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -163,16 +163,15 @@ single-decision helpers so the request history is read only once.
If a partial continuation requests another approval, that newer request also
remains pending while you resume an earlier sibling.

If an unrelated generation starts while approvals are still unresolved, they are
**automatically denied** with the reason
`"auto-denied: new generation started"`. This prevents broken message histories
where tool calls lack results. These denials are synthetic and only added to the
model's context for that request; they are not saved, so the approvals remain
pending in storage.

This does not apply when resuming approvals: on that continuation, earlier
approvals that were not part of the resume are omitted from that model request.
No response is written for them, so they remain pending in storage.
If an unrelated generation starts while approvals are still unresolved, their
tool calls are left out of its context. The model does not see them, and they
stay pending, so you can still approve or deny them later.
Comment on lines +166 to +168

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect this will result in the model making similar calls again, and then you have multiple duplicates to approved /deny? Does that "just work" in some way? i.e. you can approve the old or new ones but don't need to action both?


Approval requests and decisions are never passed to a
[context handler](./context.mdx), nor are tool calls whose approval has not run.
When generation continues from a decision, the stored calls and decisions are
appended after the handler's messages, so only decisions saved with these
methods can run a tool.
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.
Resolved

## Client-side flow

Expand Down
Loading
Loading