Repository navigation
fix: prune agent command output via Claude Code's shell prefix - #3
Merged
Merged
Conversation
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.
Overview
ACK used to wrap the agent's terminal. Agents like Claude Code run commands in their own subprocesses, so the model never saw the pruned output. This PR moves ACK onto that path: every Bash command Claude runs now goes through ACK, and the model gets the summary plus a recall handle.
Changes
ack execruns a command, streams its output through the existing pruners and archives the full log. Output is sent after a short pause or every five seconds, so dev servers stay visible.ack hook install/ack hook uninstallset ACK as Claude Code's shell prefix through a small shim. The prefix runs after Claude's permission checks, so allow rules, aliases andcdkeep working.$TMPDIRand the banner points there.ack rundoes and doesn't do.Impact
ack runis unchanged, apart from a banner that no longer says a failed archive write succeeded.Testing
python3andack recallallowed: the model saw a 3 line summary, ranack recallfrom the banner on its own, and got the exact traceback line back.