Repository navigation
feat(shell): one advisory line names the c3_* call when the shell was used as a reader or searcher (S4) - #155
Merged
Merged
Conversation
…sed as a reader or searcher (S4 helper) Claude-Session: https://claude.ai/code/session_018VQLfSMFw9Lfd9mGntt19H
… used as a reader or searcher (S4) Claude-Session: https://claude.ai/code/session_018VQLfSMFw9Lfd9mGntt19H
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
48% of c3_shell commands were cat, head, tail, sed, grep, rg, find and ls over project files (7,278 events measured 2026-09-04) — reads and searches the code-intelligence tools answer within budget, indexed, and with the index's exclusions. Cod's ruling: advisory only; refusing on size pushes agents to the native shell and loses every control. S4, the last phase of the shell remediation (campaign
c3-shell-remediation).What
cli/tools/shell_nudge.py:bypass_hint(cmd, project_path)— at most ONE[c3_shell:hint]line naming the equivalent call:c3_read(file_path, lines=[a,b])for cat/head/sed -n 'a,bp',c3_compress(mode='map')thenc3_readfor tail,c3_search(action='code'|'exact', query, path, ignore_case)for grep/rg (identifier → code, otherwise exact),c3_search(action='files', query)forfind -name/ recursive ls. Never for paths outside the project,~/$VARpaths, node_modules/dist/build/.git/.c3; a plainlsis not a search. The command is never rewritten or refused.render_shell_responseappends the line after the hint section; telemetrydetail.hintrecords the kind so the follow rate and the false-positive rate can be measured from.c3/tool_telemetry.jsonlbefore anything is promoted.Verification
15 tests (reads, sed ranges, grep identifier vs regex vs
-e, pipes, outside-project and variable paths, finds, silence for everything else, wiring + telemetry kind); shell suites 82 green; harness 26/26 unchanged; ruff clean; full suite in CI.https://claude.ai/code/session_018VQLfSMFw9Lfd9mGntt19H