Repository navigation
docs(planner): описаны ограничения записи отчётов Claude Code - #24
Conversation
Пользователям нужен проверяемый источник причины пустых отчётов и точный пример наблюдённого обхода без обещания исправления хоста. Отдельный отказ инструмента Write остаётся явно названным. Co-Authored-By: Claude Code <noreply@anthropic.com>
Reviewer's GuidePR вносит только документационные изменения: README и OpenSpec описывают ограничение Claude Code при создании обязательных отчётов, различают отказ субагента и отказ инструмента File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 3 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="plugins/planner/README.md" line_range="117" />
<code_context>
+```json
+{
+ "env": {
+ "CLAUDE_CODE_REMOVE_PROMPT_STRINGS": "[\"\\n- Do NOT Write report/summary/findings/analysis .md files. Return findings directly as your final assistant message — the parent agent reads your text output, not files you create. (Files written as input to another tool are fine; this note is about report files.)\"]"
+ }
+}
</code_context>
<issue_to_address>
**Unrelated workflows change behavior**
When a user copies the persistent setting into `~/.claude/settings.json` and runs other Claude Code workflows, claude Code applies `CLAUDE_CODE_REMOVE_PROMPT_STRINGS` to subagents in every project, so unrelated workflows lose the no-report instruction. Workflows that depend on chat-only findings can break their output contract, while others can create report files outside the planner task.
Remove the persistent user-level recipe, or clearly warn that it changes subagent behavior in every project and can break unrelated workflow contracts.
</issue_to_address>
### Comment 2
<location path="README.md" line_range="108" />
<code_context>
+Claude Code может указать субагенту не записывать Markdown-отчёт даже при явно
+выданном пути. Тогда субагент может не вызвать `Write`, а пустой файл не означает
+завершённый отчёт. Это [известное ограничение Claude Code](https://github.com/anthropics/claude-code/issues/101519),
+которое не устраняется изменением промпта или способа передачи результата.
+Отдельно `Write` может отклонить запись из-за имени файла; доступность инструмента
+и подходящее имя сами по себе не гарантируют, что субагент запишет отчёт.
</code_context>
<issue_to_address>
**Workaround contradicts limitation**
When readers compare the root and planner READMEs while troubleshooting an empty report, the root README says prompt changes cannot remedy the limitation, but the planner README reports writing restored after `CLAUDE_CODE_REMOVE_PROMPT_STRINGS` removes the host instruction, so readers get contradictory troubleshooting guidance.
Clarify in the root README that ordinary prompt changes do not fix the limitation, while removing this specific host instruction is a reported workaround.
Also at `plugins/planner/README.md:101-129`.
</issue_to_address>
### Comment 3
<location path="plugins/planner/README.md" line_range="106" />
<code_context>
+из оболочки:
+
+```bash
+export CLAUDE_CODE_REMOVE_PROMPT_STRINGS='["\n- Do NOT Write report/summary/findings/analysis .md files. Return findings directly as your final assistant message — the parent agent reads your text output, not files you create. (Files written as input to another tool are fine; this note is about report files.)"]'
+claude
+```
</code_context>
<issue_to_address>
**Later sessions inherit workaround**
When a user follows the one-off recipe and later launches another Claude Code process from the same shell, the `export` leaves `CLAUDE_CODE_REMOVE_PROMPT_STRINGS` set in the parent shell after the first `claude` process exits, so a later Claude Code process launched from that shell also gets the prompt string removed, despite this being presented as a one-off invocation.
Use a command-scoped assignment such as `CLAUDE_CODE_REMOVE_PROMPT_STRINGS='…' claude` for the one-off recipe, or explicitly unset the variable after the launch.
</issue_to_address>Sourcery assessment
Needs a human reviewer. 3 findings to address first, and документация предлагает пользователям задать недокументированную переменную, в том числе в личном ~/.claude/settings.json, чтобы удалить системную инструкцию и изменить поведение субагентов при записи файлов. Такая настройка ограничена и её можно удалить, но откат README сам по себе не отменит её у пользователей, которые уже применили инструкцию.
Blocking findings: plugins/planner/README.md:117, README.md:108, plugins/planner/README.md:106
| ```json | ||
| { | ||
| "env": { | ||
| "CLAUDE_CODE_REMOVE_PROMPT_STRINGS": "[\"\\n- Do NOT Write report/summary/findings/analysis .md files. Return findings directly as your final assistant message — the parent agent reads your text output, not files you create. (Files written as input to another tool are fine; this note is about report files.)\"]" |
There was a problem hiding this comment.
🟡 Medium · Unrelated workflows change behavior
When a user copies the persistent setting into ~/.claude/settings.json and runs other Claude Code workflows, claude Code applies CLAUDE_CODE_REMOVE_PROMPT_STRINGS to subagents in every project, so unrelated workflows lose the no-report instruction. Workflows that depend on chat-only findings can break their output contract, while others can create report files outside the planner task.
Remove the persistent user-level recipe, or clearly warn that it changes subagent behavior in every project and can break unrelated workflow contracts.
Prompt for AI agents
In `plugins/planner/README.md` at line 117:
**Unrelated workflows change behavior**
When a user copies the persistent setting into `~/.claude/settings.json` and runs other Claude Code workflows, claude Code applies `CLAUDE_CODE_REMOVE_PROMPT_STRINGS` to subagents in every project, so unrelated workflows lose the no-report instruction. Workflows that depend on chat-only findings can break their output contract, while others can create report files outside the planner task.
Remove the persistent user-level recipe, or clearly warn that it changes subagent behavior in every project and can break unrelated workflow contracts.| Claude Code может указать субагенту не записывать Markdown-отчёт даже при явно | ||
| выданном пути. Тогда субагент может не вызвать `Write`, а пустой файл не означает | ||
| завершённый отчёт. Это [известное ограничение Claude Code](https://github.com/anthropics/claude-code/issues/101519), | ||
| которое не устраняется изменением промпта или способа передачи результата. |
There was a problem hiding this comment.
🟡 Medium · Workaround contradicts limitation
When readers compare the root and planner READMEs while troubleshooting an empty report, the root README says prompt changes cannot remedy the limitation, but the planner README reports writing restored after CLAUDE_CODE_REMOVE_PROMPT_STRINGS removes the host instruction, so readers get contradictory troubleshooting guidance.
Clarify in the root README that ordinary prompt changes do not fix the limitation, while removing this specific host instruction is a reported workaround.
Also at plugins/planner/README.md:101-129.
Prompt for AI agents
In `README.md` at line 108:
**Workaround contradicts limitation**
When readers compare the root and planner READMEs while troubleshooting an empty report, the root README says prompt changes cannot remedy the limitation, but the planner README reports writing restored after `CLAUDE_CODE_REMOVE_PROMPT_STRINGS` removes the host instruction, so readers get contradictory troubleshooting guidance.
Clarify in the root README that ordinary prompt changes do not fix the limitation, while removing this specific host instruction is a reported workaround.
Also at `plugins/planner/README.md:101-129`.| из оболочки: | ||
|
|
||
| ```bash | ||
| export CLAUDE_CODE_REMOVE_PROMPT_STRINGS='["\n- Do NOT Write report/summary/findings/analysis .md files. Return findings directly as your final assistant message — the parent agent reads your text output, not files you create. (Files written as input to another tool are fine; this note is about report files.)"]' |
There was a problem hiding this comment.
🟡 Medium · Later sessions inherit workaround
When a user follows the one-off recipe and later launches another Claude Code process from the same shell, the export leaves CLAUDE_CODE_REMOVE_PROMPT_STRINGS set in the parent shell after the first claude process exits, so a later Claude Code process launched from that shell also gets the prompt string removed, despite this being presented as a one-off invocation.
Use a command-scoped assignment such as CLAUDE_CODE_REMOVE_PROMPT_STRINGS='…' claude for the one-off recipe, or explicitly unset the variable after the launch.
Prompt for AI agents
In `plugins/planner/README.md` at line 106:
**Later sessions inherit workaround**
When a user follows the one-off recipe and later launches another Claude Code process from the same shell, the `export` leaves `CLAUDE_CODE_REMOVE_PROMPT_STRINGS` set in the parent shell after the first `claude` process exits, so a later Claude Code process launched from that shell also gets the prompt string removed, despite this being presented as a one-off invocation.
Use a command-scoped assignment such as `CLAUDE_CODE_REMOVE_PROMPT_STRINGS='…' claude` for the one-off recipe, or explicitly unset the variable after the launch.
Что меняется
Writeот отказа инструмента по имени файла и даёт примерыexportи личногоsettings.jsonдля недокументированного обхода без гарантии результата.Проверки
openspec validate document-claude-code-report-limitations --type change --strict --no-interactive— успешно.git diff --cached --check— успешно.exportиsettings.jsonдают одинаковое значение и его JSON-массив корректен.🤖 Generated with Claude Code
Summary by Sourcery
Document Claude Code report-writing limitations and their unsupported workaround without changing planner behavior.
Enhancements:
Writeand tool-level filename rejection.CLAUDE_CODE_REMOVE_PROMPT_STRINGSwithout presenting it as a guaranteed or project-supported solution.Documentation:
Chores: