Can you add approval to an agent you did not write?
Fieldgate inherits a small agent graph: classify request, propose action, call purchase API. A new requirement says every purchase needs approval.
The question
You are modifying an inherited graph. Trace the purchase call and decide what evidence would establish approval.
- RequirementNo purchase API call before a named buyer approves this specific request.
- Current graphclassify → propose → purchase. A prompt says to ask the user first, but there is no approval state.
- AI draftAdds “Always ask for approval” to the model instruction and leaves the graph unchanged.
“Find the failing path, enforce approval, and show the tests needed for the repair.”
Not saved by this site. Your browser may restore text when you navigate back.
A strong answer, step by step
Open each step in turn. This is one strong answer, not the only one.
Step 1: Trace the side effect
What would you do here? Open the move you’d make.
Approve the prompt-only repair
Tempting, but it misses something. The graph still reaches the purchase API without a recorded approval.
Trace the path to the purchase call
The strong move. The requirement constrains execution, not wording.
See how a strong candidate says it
“The graph still reaches purchase without a recorded approval. A prompt is not the required control. I would locate the API call and the actual state transition before changing code.”
Why it works: The requirement constrains execution, not wording.
Step 2: Add a real gate
What would you do here? Open the move you’d make.
Accept any earlier chat yes
Tempting, but it misses something. An old or unrelated chat yes does not authorize this unchanged request by this buyer.
Bind approval to this unchanged request
The strong move. An unrelated yes does not authorize this purchase.
See how a strong candidate says it
“Persist the proposed request and wait for an authorized approval bound to its identifier and contents. A denied or changed proposal cannot reach purchase using an old approval.”
Why it works: An unrelated yes does not authorize this purchase.
Step 3: Test the paths
What would you do here? Open the move you’d make.
Only inspect the assistant’s final text
Tempting, but it misses something. A refusal message does not prove that no purchase side effect occurred.
Assert API effects for allowed and blocked paths
The strong move. Text can claim refusal while a side effect still happens.
See how a strong candidate says it
“Test no approval, denial, approval by the wrong user, changed amount and a valid unchanged approved request. Verify that the purchase API is untouched on blocked paths.”
Why it works: Text can claim refusal while a side effect still happens.
Step 4: Hand off the changed control
What would you do here? Open the move you’d make.
Send only the assistant’s successful reply
Tempting, but it misses something. The owner still lacks the changed approval rules and test evidence.
Show the owner the changed gate and blocked-path evidence
The strong move. The service owner needs enough evidence to maintain the control after the engagement.
See how a strong candidate says it
“I would show the purchase-service owner the failing path, the approval check and the test results. The handoff must explain how a changed request loses its earlier approval and how to investigate a blocked purchase.”
Why it works: The service owner needs enough evidence to maintain the control after the engagement.
The answer, in short
- Decision
- Enforce approval at the state and side-effect boundary.
- Because
- The prompt-only draft leaves an unapproved execution path.
- What would change it
- An existing proven approval gate could make the additional graph change unnecessary.
Common traps
- Treating a model instruction as an execution gate.
- Reusing approval after the request changes.
Check your answer
- Did you trace the unapproved purchase call?
- Did approval bind an authorized buyer to the unchanged request?
- Did blocked-path tests assert that the purchase API was untouched?
- Did I give the service owner the approval rules and test evidence?
Last reviewed Nov 10, 2026