Skip to content

Fix /compact same-line emission (#3)#4

Merged
koenvdheide merged 1 commit into
mainfrom
3-compact-same-line
Apr 30, 2026
Merged

Fix /compact same-line emission (#3)#4
koenvdheide merged 1 commit into
mainfrom
3-compact-same-line

Conversation

@koenvdheide

Copy link
Copy Markdown
Owner

Summary

  • Issue /compact does not fire when copy pasted #3: copy-pasting the emitted /compact\n<instructions> block fired as bare /compact and dropped the instructions, because Claude Code parses the slash command on the first line only.
  • Fix: bake /compact into the first line of the §4 schema, on the same line as goal:.
  • Default output flipped from multi-line to single-line (|-separated). Multi-line still allowed for pre-paste inspection.
  • Dropped the > blockquote wrapper in §5 (terminal copy-paste hazard flagged by Codex red-team).

Closes #3

Test plan

  • bash test/run-tests.sh passes (91/91)
  • Reviewer agent: clean (subslot keys consistent across §4 schema and §5 instructions; no stale references)
  • Codex red-team: 4 clear-wins applied (drift/redundancy from first pass, blockquote hazard); 3 tradeoffs documented
  • Manual: invoke /prep-compact:prep-compact, copy the emitted block, verify /compact ... fires as a slash command and the instructions land in the compact prompt

🤖 Generated with Claude Code

Newline directly after /compact made Claude Code fire the bare
command and drop the instructions. Bake /compact into the
schema's first line, flip default to single-line, drop the >
blockquote wrapper in §5 (terminal copy-paste hazard).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@koenvdheide koenvdheide merged commit d8ea952 into main Apr 30, 2026
2 checks passed
@koenvdheide koenvdheide deleted the 3-compact-same-line branch April 30, 2026 14:00
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.

/compact does not fire when copy pasted

1 participant