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

クローズ
#374 コメント 2 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@antonwolfy がすでに取り組んでいます。

2026年11月4日 から。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
bash, python
領域
devtools

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

#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.

主要言語
Python
スター
11
フォーク
9
平均マージ
1日 9時間
マージ済み PR(30日)
426

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

intel/dokimi のほかの issue

intel/dokimi の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。