Skip to content

docs(planner): описаны ограничения записи отчётов Claude Code - #24

Merged
spumer merged 1 commit into
masterfrom
docs/claude-code-report-limitations
Oct 21, 2026
Merged

spumer merged 1 commit into
masterfrom
docs/claude-code-report-limitations

Conversation

@spumer

@spumer spumer commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

Что меняется

  • README объясняют, почему субагент может оставить обязательный Markdown-отчёт пустым, и ссылаются на сообщение о баге Claude Code.
  • README planner отделяет отказ вызвать Write от отказа инструмента по имени файла и даёт примеры export и личного settings.json для недокументированного обхода без гарантии результата.
  • OpenSpec фиксирует границы документационной правки; поведение команды не меняется.

Проверки

  • 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:

  • Document Claude Code limitations that can prevent planner subagents from writing required Markdown reports, including the distinction between not invoking Write and tool-level filename rejection.
  • Document an observed, unsupported workaround using CLAUDE_CODE_REMOVE_PROMPT_STRINGS without presenting it as a guaranteed or project-supported solution.

Documentation:

  • Add corresponding Known limitations guidance and a link to the relevant Claude Code issue in the root and planner READMEs.

Chores:

  • Add an OpenSpec change describing the documentation scope and confirming that planner behavior and report formats remain unchanged.

Пользователям нужен проверяемый источник причины пустых отчётов и точный пример наблюдённого обхода без обещания исправления хоста. Отдельный отказ инструмента Write остаётся явно названным.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@sourcery-ai

sourcery-ai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

PR вносит только документационные изменения: README и OpenSpec описывают ограничение Claude Code при создании обязательных отчётов, различают отказ субагента и отказ инструмента Write, а также приводят недокументированный обход с явными ограничениями; поведение команд и исходный код не меняются.

File-Level Changes

Change Details Files
Документировано внешнее ограничение Claude Code, из-за которого субагент может не записать обязательный Markdown-отчёт.
  • Добавлено предупреждение со ссылкой на issue Claude Code.
  • Разъяснено, что пустой файл не означает успешное завершение отчёта и что изменение промпта или способа передачи результата не исправляет хост.
README.md
plugins/planner/README.md
Разграничены два независимых сценария отказа при записи отчёта и описан недокументированный обход без гарантий.
  • Отделён отказ субагента вызвать Write от отказа инструмента по имени файла.
  • Добавлены примеры настройки CLAUDE_CODE_REMOVE_PROMPT_STRINGS через export и личный settings.json с указанием запуска нового процесса.
  • Зафиксировано, что переменная не является поддерживаемой настройкой, не гарантирует результат и не снимает проверки имён файлов.
plugins/planner/README.md
Добавлена OpenSpec-фиксация границ документационной правки.
  • Созданы proposal, design, tasks и delta-spec для plan-execution.
  • Закреплено, что команда, форматы отчётов, агенты и настройки хоста не изменяются.
  • Добавлены сценарии для отсутствия вызова Write, недокументированного обхода и отказа инструмента.
openspec/changes/document-claude-code-report-limitations/.openspec.yaml
openspec/changes/document-claude-code-report-limitations/design.md
openspec/changes/document-claude-code-report-limitations/proposal.md
openspec/changes/document-claude-code-report-limitations/specs/plan-execution/spec.md
openspec/changes/document-claude-code-report-limitations/tasks.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread plugins/planner/README.md
```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.)\"]"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread README.md
Claude Code может указать субагенту не записывать Markdown-отчёт даже при явно
выданном пути. Тогда субагент может не вызвать `Write`, а пустой файл не означает
завершённый отчёт. Это [известное ограничение Claude Code](https://github.com/anthropics/claude-code/issues/101519),
которое не устраняется изменением промпта или способа передачи результата.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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`.

Comment thread plugins/planner/README.md
из оболочки:

```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.)"]'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@spumer
spumer merged commit 545d1f9 into master Oct 21, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant