repo: Bash reads dropped where the shell could not have moved (conservative limits of #369)

Aperta
#374 2 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@antonwolfy ci sta già lavorando.

Dal 4/11/2026.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
bash, python
Ambito
devtools

Direzione di ricerca

The payload names no files, so start from the Bash command splitter that #369 added to the Python tracing code and find where it ends a part at an inner ; inside $( ) or backticks. Reproduce with cd $(printf sub; true) | cat; cat AGENTS.md and check that the trailing relative read is currently dropped. Done means that case and the & and source .venv/bin/activate forms record the read when bash would leave the foreground directory alone, and reads the agent may not have seen stay dropped.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

#369 derives read events from Claude Code Bash commands and tracks whether a command may have moved the Bash shell (cd, pushd, popd, eval, source, .). Once the shell may have moved, later relative reads are not recorded, in that call and in the calls after it.

Where the parser cannot tell whether a directory builtin ran in the foreground shell, #369 assumes it did. That only drops reads, so guidance_read, reach's fetched, skill use and uptake can undercount, but they never count a file the agent was not shown. This issue collects the forms that are dropped this way although bash would leave the foreground directory alone. A fix for each is welcome, as long as it does not keep a read the agent may not have seen.

  • A $( ) or backtick substitution holding a separator, inside a piped or backgrounded directory command: cd $(printf sub; true) | cat; cat AGENTS.md, cd $(printf sub; true) & cat AGENTS.md, and the backtick forms. The splitter ends the part at the inner ; before the outer | or & is seen (https://github.com/intel/dokimi/pull/369#discussion_r4447632218).
  • A source .venv/bin/activate in the foreground: it counts as moving the shell, so later relative Bash reads in the trace are not recorded.
  • A cd inside a shell function the agent defines and then calls is not followed (listed in the contract's limits).

A more complete fix would read the command with a real shell parser in place of the hand-written splitter. That is a dependency decision for a separate PR.

Lingua principale
Python
Stelle
11
Fork
9
Merge medio
1g 11h
PR unite (30g)
323

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di intel/dokimi

Tutte le issue di intel/dokimi

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.