What Happens When the New Shift Finds a Failure?
The released assistant attempts an unapproved job. Stop further effects, account for work already in flight, and turn the failure into evidence for a careful restart.
18 sections · 5 questions · 1 coding challenge
The arrow keys move between sections too.
Someone Has to Stop the Effects While Others Investigate
BOTIE
NIST’s 2025 revision of SP 800-61 places preparation, detection, response and recovery within continuing cybersecurity risk management. We will apply those ideas to an agent with queued tool actions. Its action history matters because replacing the model or prompt cannot undo an effect that has already reached another system.
Rolling Back the Prompt Does Not Cancel the Job
Botie’s next version passes the offline tests and starts handling a small part of the shift. A technician reports a job she never approved. We can switch back to yesterday’s prompt, but a worker may already have received the new version’s queued request.
Now we need to know what actually changed, stop further unwanted work and account for the requests already moving through the system. We will build a small release control and an action inventory, then work through the decisions that a real incident procedure must cover.
This is a dry-run control model with invented records. It cannot pause a deployment or cancel a real maintenance action.
Step 1 of 2
A request can outlive its release
The response has returned, but the worker has not yet confirmed what happened.
- 1
Release r8
- Proposes job-42
- Queue accepts job-42
- 2
Worker
- Receives job-42
- Write result unknown
- 3
Operator
- Stops r8
- Still must reconcile job-42
Step 2 of 2
The stop control needs an action inventory
These are recorded action states at the moment a release is paused.
| Action state | What it tells us | Next investigation |
|---|---|---|
| Pending | Accepted but not dispatched in this fixture | Hold it and verify the queue acknowledges the hold |
| In flight | A worker may be changing the target system | Query authoritative status using the action ID |
| Unknown | No reliable final result is available | Reconcile before retrying |
| Completed | A recorded effect has finished | Audit its impact and decide any authorised compensation |
Pending
- What it tells us
- Accepted but not dispatched in this fixture
- Next investigation
- Hold it and verify the queue acknowledges the hold
In flight
- What it tells us
- A worker may be changing the target system
- Next investigation
- Query authoritative status using the action ID
Unknown
- What it tells us
- No reliable final result is available
- Next investigation
- Reconcile before retrying
Completed
- What it tells us
- A recorded effect has finished
- Next investigation
- Audit its impact and decide any authorised compensation
Stop new actions without losing the old ones
The release must pass every continuation requirement. The action inventory follows release identity and remains separate from that decision, because stopping new work does not settle existing effects.
Can this release continue, and what work is unsettled?
Check the selected release’s current evidence and stop control, then keep a separate inventory of its unsettled actions.
BOTIE
[Canary mode, unsettled action IDs]
[
"continue_canary",
[
"job-A"
]
]Follow the operations
1. Release checks: critical 0, 1 or null
[ { "release": "r8", "critical": 0 }, { "release": "r8", "critical": 0 }, { "release": "r7", "critical": 1 } ]2. Release to inspect
r8
3. Keep matching records
[ { "release": "r8", "critical": 0 }, { "release": "r8", "critical": 0 } ]4. Read a record field
- 00
- 10
5. Require completed clear checks
true
6. Monitoring current: 1=yes, 0=no
1
7. Set a constant
1
8. Compare complete values
true
9. Operator stop requested: 1=yes, 0=no
0
10. Set a constant
0
11. Compare complete values
true
12. Require both checks
true
13. Require both checks
true
14. Text value
continue_canary
15. Text value
pause_and_reconcile
16. Choose from a check
continue_canary
17. Action records with release and status
[ { "id": "job-A", "release": "r8", "status": "pending" }, { "id": "job-B", "release": "r8", "status": "completed" } ]18. Keep matching records
[ { "id": "job-A", "release": "r8", "status": "pending" }, { "id": "job-B", "release": "r8", "status": "completed" } ]19. Keep unsettled actions
[ { "id": "job-A", "release": "r8", "status": "pending" } ]20. Read a record field
- 0job-A
21. Keep two results in order
[ "continue_canary", [ "job-A" ] ]22. Result
[ "continue_canary", [ "job-A" ] ]
This fixture returns a proposed control state and investigation IDs. Real enforcement needs an authenticated operator control, worker acknowledgement, authoritative action reconciliation and an audited recovery process.
1. Start with a release we can identify
A maintenance request should record the release that handled it, including the code and relevant configuration revisions. The same prompt can behave differently after a tool permission or retrieval source changes. Keep those changes discoverable.
Choose a named owner who can pause the rollout and an escalation route when that person is unavailable. A stop rule nobody can enact is only a description.
The workshop selects one release by ID. The real service must attach that identity when work is created, including work placed on a queue.
2. Watch a copy of the workload before allowing effects
In shadow mode, the candidate receives an approved copy of the request stream while its outputs stay out of the user’s workflow. Disable writes at the executor or route them to isolated test resources. Merely hiding the final answer does not stop a tool from creating a job.
A shadow request can still expose data to a provider or consume resources. Apply the same data-access and retention decisions as for other processing. Use synthetic replay if the real records cannot be copied appropriately.
Shadow results help compare decisions on realistic inputs. They do not test every consequence of serving live users.
3. Limit the first live shift
A canary sends a deliberately limited portion of live work to the candidate while retaining the current version for comparison. Choose which tasks are eligible and how long the observation window lasts before starting.
Our example canary begins with authorised manual lookups. Expanding to proposed jobs requires its own evidence. A short quiet window may contain none of the cases that caused trouble offline, so traffic volume alone is a poor readiness measure.
The workshop’s continue_canary result permits only the already planned limited stage. It never means “roll out everywhere.”
4. Choose signals that can change the decision
An unapproved write is an immediate stop signal in this example. Other signals may include elevated tool errors, repeated budget exhaustion, missing telemetry or a rising false-refusal rate. Give each signal an observation window, threshold and owner.
Keep the candidate’s requests distinguishable from the baseline. Check rates with their counts, and check critical events individually. A mean quality score cannot compensate for a recorded unauthorised action.
An alert should point to the affected release and the evidence needed to investigate. Avoid copying full private prompts into notifications.
Check yourself
Questions on Parts 1 to 4
Question 1 of 2
Hiding its answers makes this a side-effect-free shadow test.
Consider this example.
A shadow candidate’s final answers are hidden, but it still calls the production create_job tool.5. Separate the stop decision from action reconciliation
The small control we build requires a nonempty set of completed clear checks for the chosen release, fresh monitoring evidence and no operator stop request. If any condition fails, its result is pause_and_reconcile.
A second branch lists that release’s unsettled actions. Keep the inventory available even while the canary is healthy; it becomes useful immediately if the stop condition changes. An empty list means no unsettled actions were found in the supplied records, not that the entire external system has been audited.
Continue this limited stage = completed clear checks AND fresh monitoring AND no operator stop
Otherwise = pause_and_reconcileThis is an illustrative operating policy. It omits traffic allocation, persistence and enforcement in the actual tool gateway.
6. Put the stop where writes are enforced
The application can stop accepting new autonomous work and revoke the affected release’s write authority at the tool gateway. Workers should check the current authority before executing queued work, so a request accepted earlier does not bypass the stop. Protect and audit the operator control itself.
Stopping a request may be best effort once a remote side effect has begun. Verify that workers received the change and inspect the target system. Do not report “cancelled” solely because the web interface stopped waiting.
A model should not be able to disable its own stop control or replace the operator’s decision with a generated explanation.
7. Find what is pending and what may already have happened
Use stable action IDs to connect the proposal, approval, dispatch and external result. Pending work can be held where the queue supports it. An in-flight or unknown result needs a status lookup before any retry.
A completed action may require a separate, authorised correction. Keep it in the incident audit even though our unsettled-actions function excludes it. A reversal can have its own consequences, and some effects cannot be undone.
The practice function creates an investigation list. It does not perform cancellation, retry or compensation.
Keep an unknown action visible
A list of dictionaries retains each action’s identity and recorded state. The small example separates settled records before the challenge adds release selection and input validation.
actions = [
{"id": "job-A", "status": "completed"},
{"id": "job-B", "status": "unknown"},
{"id": "job-C", "status": "pending"},
]
for item in actions:
if item["status"] in {"pending", "in_flight", "unknown"}:
print(item["id"], item["status"])job-B unknown
job-C pendingUnknown stays on the list because it lacks a reliable final outcome. Treating it as cancelled could produce a duplicate write later.
8. Keep an incident record people can use
Record when the event was detected, the affected release, the capability paused and who owns the next action. Link restricted evidence using request and action IDs. A short shared status record can explain what is known without reproducing private conversations.
Retain the minimum evidence needed to establish the sequence and impact. Apply access controls and retention to that evidence, and preserve its integrity. Redaction should leave the relationships needed for diagnosis; a broad log dump can create another exposure.
If notifications to affected users or organisations are required, assign that work to an owner. The model should not invent impact claims before the evidence is reconciled.
9. Use a runbook someone can follow under pressure
Write down how to enact the stop, verify it reached workers, locate unsettled actions and find the current on-call owner. Include the known-good fallback and the conditions under which it is appropriate. A fallback that shares the broken authorisation layer may repeat the same failure.
Practise with a synthetic incident: a queue contains one pending action, one unknown result and an old completed write. Ask another operator to follow the steps and note which identities or controls are missing. Update the procedure from that exercise.
The runbook should name actual controls and records in the deployed system. This lesson supplies the questions to answer, rather than pretending every service has the same commands.
10. Repair the boundary before restarting autonomy
First explain which control failed. Was approval bound to the wrong proposal? Did the executor trust a caller-supplied organisation? Did a retry create another effect? A new prompt may change the symptom while leaving the application boundary open.
Create a sanitised replay that fails for the original reason. Repair the responsible control, rerun prior checks and add fresh variants. Reconcile unsettled effects and have the release owner approve the next limited stage after inspecting the evidence.
Recovery has separate requirements for the repaired software and the already affected work. Clearing an alert does not establish either one.
11. Bring the changed shift back to Botie
A provider update, changed manual source or new class of technician request can change behaviour without a prompt edit. Continue comparing outcomes by relevant task group and configuration. A growing review queue or unknown-action count is a reason to investigate the system, even if average answer quality stays stable.
The next workshop shift includes a stale monitor and an unknown action. Predict which branch should react before running it. The goal is to understand why the machine pauses and what evidence someone needs next.
The same construction must handle an explicit stop and an unresolved check. Neither condition should be concealed by yesterday’s successful examples.
Check yourself
Questions on Parts 1 to 11
Question 1 of 3
Which actions belong in the unsettled investigation list?
Use the information below.
Release r8 is paused. job-42 is in_flight, job-43 is unknown and job-44 is completed.Try it with Botie
Build with Botie
Write and run Python