Skip to content

fix: prevent auditor from overwriting agent handoff#16

Merged
George-iam merged 1 commit intomainfrom
feat/handoff-overwrite-fix-20260406
Apr 6, 2026
Merged

fix: prevent auditor from overwriting agent handoff#16
George-iam merged 1 commit intomainfrom
feat/handoff-overwrite-fix-20260406

Conversation

@George-iam
Copy link
Copy Markdown
Contributor

Summary

  • When agent writes handoff via axme_close_session (source=agent), the auditor was overwriting it with its own transcript-based version
  • Agent handoff is now authoritative - auditor only writes handoff as fallback for orphan/crash sessions
  • Fixes issue where Source: auditor appeared in handoff.md after explicit session close

Test plan

  • Build passes (npm run build)
  • TypeScript check passes (npx tsc --noEmit)
  • E2E: close session via axme_close_session, verify handoff.md has Source: agent
  • E2E: kill MCP server mid-session (orphan), verify auditor writes handoff with Source: auditor

When agent writes handoff via axme_close_session (source=agent), the
subsequent auditor run was overwriting it with its own version based
on the transcript (which may be truncated). Agent handoff is now
treated as authoritative - auditor only writes handoff as fallback
for orphan/crash sessions where no agent handoff exists.
@George-iam George-iam merged commit 4eb1430 into main Apr 6, 2026
@George-iam George-iam deleted the feat/handoff-overwrite-fix-20260406 branch April 7, 2026 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant