Shell interception hook: answer grep/rg/cat on indexed code via code-index and record real fallbacks (zero-fallback) #560
Labels
No labels
code-review
correctness
dos
performance
security
severity/high
severity/low
severity/medium
tech-debt
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Reference
h-dv/code-index#560
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of the zero-fallback epic (#555). Cause: habit. The shell is the first thing an agent's training reaches for.
Proposal
An optional agent-harness hook (Claude Code
PreToolUseonBash; equivalent for Codex if feasible), shipped beside the existing blast-radius hook (crates/cli/src/hooks/blast_radius.py) and using the 24 mscode-index queryCLI:grep/rg/cat/sed -n/headon paths the index covers (index_coveragesemantics) and answers it with code-index directly. The hook returns the equivalent code-index result, plus the one-line tool call that would have produced it, so the next lookup goes direct.Acceptance
rg -n foo crates/on an indexed tree → the reply comes from code-index with the suggested call.rg foo target/passes through.Merged into #571.
No shell translation hook is implemented; the old rules/hook installer was removed in v0.41.49 (crates/cli/src/skill.rs is the opt-in skill path).
Remaining: Optional shell hook, subject to the operator’s channel decision and real-agent measurement.