What do you all think about adding an explicit app...
# proj-agent
a
What do you all think about adding an explicit approval event to the SDK? Today we record what the agent tried to do and what happened, but clicking Approve doesn’t leave its own record. I’m thinking we’d record approve or reject against the exact tool call. The reason for this is sometimes security/auitors want to know who approved what and when. Claude Code does something similar by logging the permission decision separately from the tool result. Does this feel like something we should add to the SDK?
l
Yeah, I think so
That’s a good idea!
a
ok, cool, let me sketch out something and I will pull one of you in to review before I get too far
🚀 1
q
yeah approval today is implicit we have
WAITING_FOR_CONFIRMATION
state, and tools executed after this state transition are for sure due to user approval and
UserRejectObservation
is an explicit rejection event
a
Ahh good to know, i feel this might have a design element that I want to make sure aligns with how the SDK is architected.
haha, I misunderstood, ok, i got it now
q
Yeah originally I had approval be implicit as to not bloat the sdk with various observation events And rejection had to be an explicit observation event because you need a valid action-observation pair for the agent loop to continue (and for the agent to see the reject + reason)
nod 1
(explicit approval sounds great though)
a
Thanks for explaining how approvals work today. My proposal is to add explicit approval as an opt-in SDK option. The existing flow stays the default. If a caller enables explicity approval, the SDK records approve or reject for the exact batch of tool calls, with a decision ID and timestamp. The record stays out of the model context, and rejection still uses UserRejectObservation so the agent gets a valid result and reason. Enterprise can attach the signed-in reviewer later. How does that sound? Any measurements you would want?
l
I think having them as actual actions/observations is probably good though because it gives the option to visualize them in the UI, etc.
👍 1
a
Agreed on making it visible in the UI. The SDK change gives the approval decision its own typed event in the same conversation stream, with IDs that link it to the exact actions. The UI can render it next to the tool result.
UserRejectObservation
still gives the model the rejection and reason, and the approval event stays out of the model context. Does that cover what you had in mind for visualization?
🙌 2
c
Just to note, we have now decision cards too. For these, there’s an
ask_user
tool in the SDK and an
AskUserAction
. Though I’m not sure we can use it for this… probably need a new one 🤔
a
Hmm, let look and see if that fits in
Yea, this is good stuff for why someone did something to fit into the conversational flow, but I am right now focused on the multi-player where we need to attribute everything to someone
aha 1