Skip to content

feat(cli): supervise active AXI agent sessions#506

Open
simfor99 wants to merge 8 commits into
kunchenguid:mainfrom
simfor99:feat/axi-native-agent-supervision-upstream
Open

feat(cli): supervise active AXI agent sessions#506
simfor99 wants to merge 8 commits into
kunchenguid:mainfrom
simfor99:feat/axi-native-agent-supervision-upstream

Conversation

@simfor99

@simfor99 simfor99 commented Jul 16, 2026

Copy link
Copy Markdown

What Changed

  • Add opt-in Stop-hook supervision for armed AXI runs in Codex and Claude Code, with bounded local session state, safe heartbeats, and explicit pauses for user decisions.
  • Add axi watch plus richer liveness reporting so foreground agents receive bounded updates when a run needs attention, CI checks pass, becomes quiet, or terminates.
  • Harden GitHub CI monitoring by evaluating required checks with source and policy provenance, retaining verified classic protection fallbacks while failing closed on ambiguous rules access.

Risk Assessment

⚠️ Medium: The corrected GitHub Enterprise fallback now fails closed for ambiguous 404s, but this remains a substantial cross-cutting supervision and CI-monitoring change.

Testing

Completed 1 recorded test check.

  • Outcome: 🔧 1 issue found → auto-fixed ✅ across 2 runs (7m46s)

Pipeline

Updates from git push no-mistakes

⏭️ **intent** - skipped

✅ No issues found.

🔧 **Rebase** - 2 issues found → auto-fixed ✅
  • ⚠️ docs/src/content/docs/guides/configuration.md - merge conflict rebasing onto origin/main
  • ⚠️ internal/config/config.go - merge conflict rebasing onto origin/main

🔧 Fix applied.
✅ Re-checked - no issues remain.

🔧 **Review** - 1 issue found → auto-fixed (2) ✅
  • ⚠️ internal/scm/github/github.go:578 - GitHub Enterprise installations that support classic branch protection but not the newer /rules/branches/{branch} endpoint will mark the policy unresolved. The synthetic pending check then keeps CI running until timeout even when all real checks passed. Treat an unsupported rules endpoint separately and retain the successfully read classic policy.

🔧 Fix: Preserve classic policy when Rules endpoint is unsupported
1 error still open:

  • 🚨 internal/scm/github/github.go:605 - Every HTTP 404 from the rules endpoint is treated as an unsupported endpoint. GitHub also uses 404 to conceal an endpoint from a token lacking ruleset access; in that case required workflow rules are silently ignored and the monitor can report checks passed. Preserve the classic-policy fallback only after positively identifying an unsupported legacy-server endpoint; keep ambiguous 404s fail-closed.

🔧 Fix: Fail closed on ambiguous GitHub rules 404s
✅ Re-checked - no issues remain.

🔧 **Test** - 1 issue found → auto-fixed ✅
  • 🚨 tests failed with exit code 1
  • go test -race ./...

🔧 Fix: Stabilize branchsync hook regression tests
✅ Re-checked - no issues remain.

  • go test -race ./...
🔧 **Document** - 2 issues found → auto-fixed ✅
  • ⚠️ internal/cli/axi_render.go:477 - Live AXI guidance still says backgrounding is fine, contradicting the updated skill and CLI reference; correcting it requires changing executable output, outside this documentation-only scope.
  • ⚠️ internal/cli/axi_supervise.go:76 - Supervisor command/help strings describe Codex-only supervision although the implementation and CLI reference support Claude Code too; correcting user-facing strings requires executable-code changes.

🔧 Fix: Align AXI supervision guidance
✅ Re-checked - no issues remain.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

simfor99 and others added 8 commits July 19, 2026 16:22
* feat(axi): supervise Codex runs

* docs(plan): record supervisor evidence

* no-mistakes(review): Harden AXI supervision state and worker recovery

* no-mistakes(review): Serialize AXI worker lock release and failures

* no-mistakes(review): Park pre-armed AXI decision gates

* no-mistakes(test): Isolate HEAD-reset hook test from ambient configuration

* no-mistakes(document): Document AXI watch and supervision state

* docs(plan): harden hook-native supervisor design

* feat(axi): keep Codex supervision in the active session

Replace the detached worker and resume process with a hook-native event loop. Bound unchanged heartbeats and document the required local hook timeout.

* no-mistakes(review): Harden AXI supervision bindings and recovery

* no-mistakes(review): Separate subscription handshake and heartbeat lifetimes

* no-mistakes(review): Synchronize handshake cancellation with live subscriptions

* no-mistakes(test): Render supervision phases in AXI status

* no-mistakes(document): Document hook-native supervision contract

* fix(ci): distinguish advisory legacy pending statuses

* no-mistakes(review): Paginate GitHub rules and refresh CI provenance head

* no-mistakes(review): Support provenance API in GitHub CI test fakes

* no-mistakes(review): Fail closed on ambiguous GitHub protection 404s

* no-mistakes(document): Dokumentiert GitHub-CI-Provenienz

* no-mistakes(review): Guard GitHub checks and AXI watch telemetry

* no-mistakes(review): Harden GitHub required check provenance

* no-mistakes(review): Harden AXI hook deduplication and watch activity

* no-mistakes(review): Use fallback activity for AXI watch timers

* no-mistakes(document): Document GitHub CI provenance guard
@simfor99
simfor99 force-pushed the feat/axi-native-agent-supervision-upstream branch from da5d41e to 62d8080 Compare July 19, 2026 14:53
@simfor99 simfor99 changed the title feat(axi): supervise Codex and Claude Code sessions feat(cli): supervise active AXI agent sessions Jul 19, 2026
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