Severity: medium · Area: engine / execution protocol
Capability: Engine-emitted CHECKPOINT action to save state and suggest a fresh Claude session when context rot is detected.
Documented claim: ActionType.CHECKPOINT is listed as one of the 9 canonical action types in agent_baton/models/execution.py:72, agent_baton/models/CLAUDE.md, docs/architecture/state-machine.md, and docs/invariants.md §4 (wire-format block). The state-machine doc describes it as "Save state and suggest a fresh session to prevent context rot."
Actual state: The enum value exists but no code in the executor or any other engine module ever constructs or returns a CHECKPOINT action. _print_action() in agent_baton/cli/commands/execution/execute.py has no CHECKPOINT branch; a CHECKPOINT would fall to the generic else branch (message only, no structured fields). The context-rot detection that would trigger this action does not exist anywhere in the codebase.
Why it is a stub: Documented as a first-class protocol action, but neither the detection logic nor the emission logic is implemented.
Suggested fix: Either (a) implement context-rot detection in the executor (track cumulative action count / token estimate per session; emit CHECKPOINT when a threshold is exceeded) and add a CHECKPOINT branch to _print_action() with its documented wire fields, or (b) remove CHECKPOINT from the enum and docs until planned — option (b) is a coordinated protocol change per docs/invariants.md §4.
Evidence: agent_baton/models/execution.py:72; grep of agent_baton/**/*.py finds zero CHECKPOINT emissions; agent_baton/cli/commands/execution/execute.py _print_action() handles DISPATCH/GATE/APPROVAL/FEEDBACK/COMPLETE/FAILED/INTERACT only.
🤖 Filed from the capability-vs-docs audit (HEAD 12999f2). Docs already updated to mark CHECKPOINT as not-yet-emitted.
Severity: medium · Area: engine / execution protocol
Capability: Engine-emitted CHECKPOINT action to save state and suggest a fresh Claude session when context rot is detected.
Documented claim:
ActionType.CHECKPOINTis listed as one of the 9 canonical action types inagent_baton/models/execution.py:72,agent_baton/models/CLAUDE.md,docs/architecture/state-machine.md, anddocs/invariants.md §4(wire-format block). The state-machine doc describes it as "Save state and suggest a fresh session to prevent context rot."Actual state: The enum value exists but no code in the executor or any other engine module ever constructs or returns a CHECKPOINT action.
_print_action()inagent_baton/cli/commands/execution/execute.pyhas no CHECKPOINT branch; a CHECKPOINT would fall to the genericelsebranch (message only, no structured fields). The context-rot detection that would trigger this action does not exist anywhere in the codebase.Why it is a stub: Documented as a first-class protocol action, but neither the detection logic nor the emission logic is implemented.
Suggested fix: Either (a) implement context-rot detection in the executor (track cumulative action count / token estimate per session; emit CHECKPOINT when a threshold is exceeded) and add a CHECKPOINT branch to
_print_action()with its documented wire fields, or (b) remove CHECKPOINT from the enum and docs until planned — option (b) is a coordinated protocol change perdocs/invariants.md §4.Evidence:
agent_baton/models/execution.py:72; grep ofagent_baton/**/*.pyfinds zero CHECKPOINT emissions;agent_baton/cli/commands/execution/execute.py_print_action()handles DISPATCH/GATE/APPROVAL/FEEDBACK/COMPLETE/FAILED/INTERACT only.🤖 Filed from the capability-vs-docs audit (HEAD
12999f2). Docs already updated to mark CHECKPOINT as not-yet-emitted.