Skip to content

Fix #57: oversized prompts ride in a file, not on the typed command line - #58

Merged
scgopi merged 1 commit into
mainfrom
fix/issue-57-goal-truncation
Aug 7, 2026
Merged

Fix #57: oversized prompts ride in a file, not on the typed command line#58
scgopi merged 1 commit into
mainfrom
fix/issue-57-goal-truncation

Conversation

@scgopi

@scgopi scgopi commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Fixes #57

A multi-KB --goal was typed into the new session's PTY and macOS canonical-mode input capped the line at ~1KB: words dropped mid-string, the shell parked at an unsubmitted continuation prompt, no backend process ever existed while the node read running.

The launch path's overflow ladder had one rung — drop the briefing — and returned that command unchecked, so a prompt that was itself past the typed-line budget still went out corrupt. Now:

  • Past the budget, the full prompt is written to PROMPT.md beside the node's wake digest and the typed line carries only a short ASCII pointer.
  • The briefing is no longer sacrificed when the pointer makes room for it.
  • The file keeps the prompt's newlines, which the typed line always had to flatten.
  • Copilot/Codex get the file's directory granted (--add-dir); Claude Code needs nothing extra.
  • A remote node's copy is delivered by the same installer script as the briefing and wake digest.

Tests: 3 new in ZmxSessionLauncherTests, 1 rewritten in SessionBriefingTests (it previously pinned the corrupt-prone fallback).

🤖 Generated with Claude Code

https://claude.ai/code/session_01JbG2Xd7tX1dYPhFxjiabUu

A multi-KB goal was typed into the new session's PTY, and a tty in
canonical mode drops everything past MAX_CANON (1024 bytes): the tail
was eaten mid-word, the shell parked at an unsubmitted continuation
prompt, and no backend process ever existed while the node read
running (issue #57).

The overflow ladder previously had one rung — drop the briefing — and
returned that command unchecked, so a prompt that was itself past the
budget still went out corrupt. Now the prompt moves to PROMPT.md
beside the node's wake digest, the typed line carries only a short
ASCII pointer, and the briefing no longer needs to be sacrificed to
make room. The file keeps the prompt's newlines, which the typed line
always had to flatten. Path-verifying backends get the directory
granted, and a remote node's copy rides the same installer the
briefing and wake digest already use.

Fixes #57

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JbG2Xd7tX1dYPhFxjiabUu
@scgopi
scgopi merged commit 02735fd into main Aug 7, 2026
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.

Multi-KB --goal text is silently truncated by canonical-mode tty (MAX_CANON) at launch

1 participant