fix(agent): mark claude-compat harnesses (grok/devin/continue) signal-capable#2405
Open
abhay-codes07 wants to merge 1 commit into
Open
Conversation
…-capable SupportsHarness backs the SignalCapable input to status derivation: a signal-capable harness whose hooks go silent past the no_signal grace is shown "no_signal" (broken pipeline), while a hook-less harness stays "idle". It decided capability by looking the harness name up in Derivers. grok, devin, and continue are Claude-compat harnesses: their GetAgentHooks delegates to the claude-code plugin, installing byte-identical `ao hooks claude-code <evt>` callbacks, so they have a fully working activity pipeline (routed through the registered claude-code deriver at runtime). But their harness names aren't Derivers keys, so SupportsHarness returned false for them — a grok session and a claude-code session install the same bytes, yet a broken-hook grok session was shown a confident "idle" forever instead of "no_signal". Track the three delegating harnesses in a small claudeCompatHarnesses set and have SupportsHarness consult it, without polluting the runtime dispatch map (nothing emits `ao hooks grok`). Adds a regression test.
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.
Closes #2402.
What
SupportsHarnessbacks theSignalCapableinput to status derivation: a signal-capable harness that goes silent past the 90snoSignalGraceis shownno_signal(broken hook pipeline), while a hook-less harness staysidle. It decided capability by looking the harness name up inDerivers.grok,devin, andcontinueare Claude-compat harnesses — theirGetAgentHooksdelegates to the claude-code plugin, installing byte-identicalao hooks claude-code <evt>callbacks, so they have a fully working activity pipeline (routed through the registered claude-code deriver at runtime). But their harness names aren'tDeriverskeys, soSupportsHarnessreturned false for them: a grok session and a claude-code session install the same bytes, yet a broken-hook grok session was shown a confidentidleforever instead ofno_signal.Change
Track the three delegating harnesses in a small
claudeCompatHarnessesset and haveSupportsHarnessconsult it, without polluting the runtime dispatchDeriversmap (nothing emitsao hooks grok). Kept as a dedicated set soDeriversstays the single source of truth for runtime dispatch.Tests
TestSupportsHarnessClaudeCompatDelegatesasserting grok/devin/continue are signal-capable. Fails before the change (all false), passes after.TestSupportsHarness(hook-less harnesses stay false) andTestDeriverTokensAreKnownHarnessesstill pass.go test ./internal/adapters/agent/activitydispatch/...green;go vetand gofmt clean.cc @harshitsinghbhandari — these three delegate to claude-code's hooks, so they seemed like they should match claude-code's no_signal behavior; open to a different shape if you prefer.