Feat/claude answer channel oneshot#183
Merged
Merged
Conversation
Council/forge/brainstorm/tribunal claude members are dispatched one-shot via
runClaudePtyDispatch/runClaudePtyStreamDispatch (exec mode) and their answer is
SCRAPED from the TUI — which corrupts long answers (vertical scroll past `rows`
→ "Cul ura ri k") and intermittently returns chrome bleed / empty.
Add an opt-in structured answer channel (AGON_CLAUDE_ANSWER_CHANNEL=file): claude
writes its complete answer to a temp file via its already-allowed native Write
tool, and agon reads that file as the AUTHORITATIVE result, falling back to the
scrape only if the file is absent. No MCP, no -p (stays on the flat-rate
subscription TUI), no kern-engines change. Default off.
This mirrors how Cesar (session-pty.kern) already delivers via DeliverAnswer, but
without an agon dependency — so the same primitive is portable to kern-sight,
which has the identical scrape bug. The mcp variant (DeliverAnswer) is reserved
as 'mcp' mode for a follow-up; readAnswerChannelFile already accepts both raw
markdown (file) and a {text} JSON envelope (mcp).
Validated live via `agon ask claude` on the exact corrupting prompt class
("cultural risk / unprecedented permanent consequences", 3 paragraphs):
breadcrumb `answer-channel(file): hit 1917ch`, output byte-clean. Channel-off
path unchanged (regression-checked). 20 adapter-helpers unit tests green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Flip AGON_CLAUDE_ANSWER_CHANNEL from default-off to default-ON for one-shot claude exec dispatch, matching kern-sight: council/brainstorm/tribunal/synthesis members now deliver via the clean Write-to-file channel automatically, with no env var to set. Opt out with AGON_CLAUDE_ANSWER_CHANNEL=off (raw scrape, for debugging). Still falls back to the scrape whenever claude doesn't deliver, so it is never worse than before. Gate the per-dispatch breadcrumb behind AGON_DEBUG so default-on doesn't add stderr noise to every council run. Validated live: zero-config `agon ask claude` → channel hit (5/5 across runs); `=off` correctly disables it. 20 unit tests green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
No description provided.