mirror of
https://github.com/stablyai/orca.git
synced 2026-10-23 08:03:39 +00:00
The fallback was defensive code that kept finding new ways to be wrong: it consulted a list `src/shared/harness-injected-user-turns.ts` maintains for prompt-derived UI (so a UI edit silently changed which frames could claim a send's identity), it rejected a genuine echo whose own text opened with a harness shape, its string-content branch returned before the tool-result rejection, and the latch that switched it off lived on the session object - so it reset on every reconnect and re-opened the original bug once per connection. Measured against the real CLI instead: `--replay-user-messages` is unconditional in CLAUDE_STRUCTURED_BASE_ARGS, and every echo it produces is stamped - verified for text, image-only and text+image sends. A slash command may get no user echo at all, which `acceptsResult` already settles on the command's result receipt. So the marker is the whole test. No content sniffing, no shared list, no latch, no per-reconnect window: -98 lines. The fake CLI in claude-structured-session-adapter.test.ts echoed sends WITHOUT `isReplay`, unlike the real binary. That double is what made a content-sniffing gate look necessary; it now stamps like the real thing. Found by the review loop on #15657.