Skip to content

Stop fable's context from being spilled to a preview - #263

Merged
fcakyon merged 1 commit into
mainfrom
fix/fable-context-spill
Jul 29, 2026
Merged

Stop fable's context from being spilled to a preview#263
fcakyon merged 1 commit into
mainfrom
fix/fable-context-spill

Conversation

@fcakyon

@fcakyon fcakyon commented Jul 29, 2026

Copy link
Copy Markdown
Owner

#262 raised the truncation caps, which pushed fable's injected context from 22KB to 65KB. Past ~64KB the harness spills additionalContext to disk and hands the subagent a ~2KB preview, so the reviewer ended up with less than before. Codex never hit this because it already stages to a file.

before after
emitted payload 67,302 B 293 B
reviewer sees 2KB preview whole conversation
  • the agent is told to read a path now, so its marker line stays truthful
  • one terminal emit, so a throw can no longer write two JSON objects
  • contextFile is set after the write returns, so the path always resolves
-emit(`You are reviewing an in-progress Claude Code session. ...${recent}...`)
+writeFileSync(staged, `You are reviewing an in-progress Claude Code session. ...${recent}...`)
+emit(`Read ${staged} before answering. ...`)

Verified across 8 hook inputs (missing file, malformed stdin, null path, empty file, junk lines, directory as path): all exit 0, all emit exactly one object, none above 341 B.

A large additionalContext gets spilled to disk and previewed, so the raised caps were losing context instead of adding it.
@fcakyon fcakyon self-assigned this Jul 29, 2026
@fcakyon
fcakyon merged commit 53cd7ef into main Jul 29, 2026
2 checks passed
@fcakyon
fcakyon deleted the fix/fable-context-spill branch July 29, 2026 01:41
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