Repository navigation
Stop hera_send from restarting live workers; add worker conduct to hera skill - #1066
Merged
Merged
Conversation
…ra skill hera_send's auto-revive reused hera_revive's full gate, whose idle+not-blocked branch kicked (SIGTERM + resume) every live idle worker a coordinator messaged, killing the worker's in-session background jobs. The send path is now dead-only (hera.ReviveDeadRole, skipped_alive for any live session); explicit hera_revive keeps its kick, documented as a last resort. The hera skill gains worker verification-scope and long-job-survival rules, a coordinator check-progress-don't-ping rule, and corrects the claim that hera_revive is a safe no-op on a healthy role. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merging this branch will increase overall coverage
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. Changed unit test files
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
hera_sendfrom a coordinator ranhera_revive's full check before delivering every message. That check treats "alive, idle for 3s, not parked at a prompt" as stuck and kicks the session (SIGTERM, then a resume via--session-id). That is the normal resting state of a worker between turns, or one waiting on a background job. So every coordinator message to an idle worker restarted it, and the agent's own shutdown killed its in-session background jobs (Bashrun_in_background).Evidence from
~/.argus/daemon.logon 2026-10-18/19: 120outcome=kicked_stuckrevives across 7 orchestrators. Each was followed within about a second bysession exited stopped=true exit status 143 pending=true. Thesketch-guides-docsvideo workers lost 20-minute frame renders and encodes at exactly those moments, and their transcripts report "another session restart" seconds after each kick.What changes
hera_send's auto-revive now restarts a recipient only when its session is dead. It never kicks a live one; the message itself wakes an idle agent. A live recipient is reported as the newskipped_aliveoutcome.hera.ReviveDeadRole, which shares the dead-restart path withReviveRole.mcp.HeraReviveInput.DeadOnlyfield; the daemon picks the primitive inreviveForInput.hera_revivekeeps its kick, now with an honest description. The tool description, the README table and the hera skill now say plainly that a kick restarts the agent and kills its in-session jobs, so it's a last resort for a truly wedged session.internal/skills/builtin/hera/SKILL.md):hera_reviveis "a safe no-op" on a healthy role;nohupwith a log and an exit-code marker that is checked after any restart.fix-hera-send-no-kickis archived in this PR. It replaces the hera-messaging requirement "auto-revives a dead or stuck recipient" with "auto-revives a dead recipient".context/knowledge/gotchas/messaging.md, including the follow-up that was not built: an explicit kick could refuse while the agent has live job processes.Testing
internal/hera:ReviveDeadRoletable test, covering a dead session (restarted) and live idle, busy, blocked and coordinator sessions (never kicked).internal/mcp: the send path asks forDeadOnly: true; explicithera_reviveasks forDeadOnly: false.internal/daemon: end-to-endreviveForInputagainst a real fixture session. A live session keeps the same PID with no pending restart; a dead one is restarted.make pre-prlocally:vulnfailed on 10 Go standard-library advisories. That check is advisory in CI (continue-on-error).test-cover-gate: three failures in packages this PR doesn't touch, all of which pass when rerun on their own (load flakes pergotchas/ci-gates.md):internal/apiTestTailscaleIPFromCLI_AcceptsCGNATOutput,internal/daemonTestHeraRecycleRunner_IsIdle_UsesContentStability, and aninternal/tui200s package timeout.Frontend parity
hera_sendis MCP-only, so there is no REST, TUI, web or macOS surface change. The TUI's Enter-key revive is operator-initiated and unchanged.🤖 Generated with Claude Code