-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
Bug: heredoc exec summaries parse body contents as command stages #99367
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.no-staleExclude from stale automationExclude from stale automation
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.no-staleExclude from stale automationExclude from stale automation
Type
Fields
Priority
None yet
Summary
Codex app-server command summaries can parse shell heredoc bodies as executable command stages. When an inline script or generated file contains JavaScript/YAML/shell-like text, Slack/tool-progress output can show a noisy chain such as:
run python3 inline script (heredoc) → run const slugify → run flutter-action@v2 ...Those fragments are generated file contents, not commands that were executed.
Observed reproduction
Observed on 2026-07-02 from a Slack-started
builder-courtmixsession. A declined inline-script write surfaced in the ops channel as a failed command summary containing heredoc body fragments, including JavaScriptconst ...fragments and generated GitHub Actions YAML such asflutter-action@v2.The operator-facing symptom is confusing because it looks like multiple commands ran and failed, when the actual command was one heredoc/inline-script launcher and the approval was declined.
Expected behavior
When an exec command contains a heredoc redirect, the display parser should summarize only the launcher command line, preserving cwd/chdir context when available. It should not split heredoc body contents into shell stages or pipeline segments.
Separately, declined command approvals should surface as declined/blocked rather than as a generic failed-command warning when that information is available.
Local workaround carried downstream
JoeArmani/openclaw-controlcarries a build patch namedapplyHeredocExecSummaryCompaction/patchExecHeredocSummaryCompaction. The patch detects heredoc redirects beforesummarizeExecCommandcalls top-level stage splitting, then summarizes the first launcher line only.Regression coverage:
tests/build-patches/tool-display-mutations.test.mjsasserts the heredoc guard is inserted beforesplitTopLevelStages(cleaned).Notes
This is distinct from issue #93139, which tracks literal
\ninsertion in heredoc/write contents. This issue is about the command display summary incorrectly parsing valid heredoc body text as executed command stages.