Skip to content

CHECKPOINT ActionType is defined but never emitted and has no handler in _print_action() #103

Description

@DaveGerson

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions