Commit 462fa2f
fix(claude_code): stop echoed system prompt from short-circuiting trust dialog (#319)
The startup handler treated any "> "/"❯ " in the capture buffer as the idle
prompt and returned early. The injected --append-system-prompt contains a line
starting with "> `memory_store`", which the shell echoes into the capture
buffer ~300ms before the workspace-trust dialog renders. The handler matched
that marker, declared Claude Code ready, and returned before accepting the
trust dialog. initialize() then blocked on {IDLE, COMPLETED} for 30s and the
session was killed, so `cao launch` failed on every not-yet-trusted working
directory.
Remove the bare IDLE_PROMPT_PATTERN early-return. The version banner
("Welcome to" / "Claude Code v<n>") is the only ready signal that cannot appear
in the echoed launch command; the trust and bypass dialogs are still handled
explicitly above, and wait_until_status() remains the real readiness gate.
Add a regression test that returns the echoed command on the first poll and the
trust dialog on the second, asserting the trust dialog is accepted (the old
early-return would skip it).
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 17ae1f1 commit 462fa2f
2 files changed
Lines changed: 45 additions & 12 deletions
File tree
- src/cli_agent_orchestrator/providers
- test/providers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
341 | | - | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
342 | 354 | | |
343 | 355 | | |
344 | 356 | | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | 357 | | |
349 | 358 | | |
350 | 359 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| 70 | + | |
69 | 71 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
75 | 95 | | |
76 | | - | |
| 96 | + | |
77 | 97 | | |
78 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
79 | 103 | | |
80 | 104 | | |
81 | 105 | | |
| |||
0 commit comments