worker: prompt-too-long hint is code-flow-specific; misleading for design agents #95
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#95
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
User story
As the operator debugging a failed run, I want the
prompt-too-longhint in the service log to point at the real cause for the agent that failed, not a one-size-fits-all rule. Right now it sends designers down a rabbit-hole that doesn't apply to them.What happens today
src/worker.ts:217–228catches"prompt is too long"/"context_length_exceeded"and emits a fixed hint:That hint is code-flow-specific. It's the right rule for
dev/boss/reviewer(where overflow was first observed: dev feeding an entire 400-line file asmcp__forgejo__update_filecontent — #79).When
designeroverflows — as observed today on taskd3883982(#70) — the root cause is Penpot MCP accumulation (100+create_frame/create_textround-trips), not a misuse of any forgejo file tool. The hint points at an irrelevant skill rule and covers the actual cause (raise context window / compact history).Acceptance criteria
Code
src/worker.tssplits the hint by agent role:dev,boss,reviewer): current wording; refs #79.designer,design-reviewer): new wording pointing at #94 ("designer needs 1M context") and the Penpot-accumulation cause — useclaude-opus-4-7[1m]and/or split the task across multiple dispatches.result.errorfield (shown in the dashboard) mirrors the log hint, so the operator sees the right message in the task detail view too.src/webhook-routing.ts(theREVIEWER_AGENTS/DESIGN_AGENTSsets, or equivalent).Tests
worker.test.ts: a design-agent config + a prompt-too-long error yields the Penpot-flavored hint, not themcp__forgejo__*_fileone.Out of scope
References
d3883982-7b23-4083-ac18-38b42b98e633on #70.src/worker.ts:217— theisPromptTooLongbranch.mcp__forgejo__*_file).src/webhook-routing.ts— existing agent classification (REVIEWER_AGENTS, design-reviewer-author routing).Dependencies
main.