Skip to content

Verify completed delegation before exiting the smart-routing CUJ - #1090

Closed
lilly-luo wants to merge 2 commits into
mainfrom
lillyluo/fix-claude-background-task-wait
Closed

lilly-luo wants to merge 2 commits into
mainfrom
lillyluo/fix-claude-background-task-wait

Conversation

@lilly-luo

@lilly-luo lilly-luo commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

CUJ4 opens /tasks as soon as the delegated child's answer appears, before requiring the parent to finish its reply. Claude 2.1.290 can open an individual agent's detail panel at that point; the test then times out waiting for a different task-list layout. This caused the subagent_only_v0 failure in #1083.

Make the test follow the delegation journey for both Claude and Codex: require the child's native answer, wait for the parent's completed native turn containing the delegated result, verify routing and served-model evidence after that turn, and require a normal /exit. The test no longer opens /tasks or parses its layout. Existing child-count, routing, and inference assertions remain.

Claude's native task-notification message belongs to the ongoing delegation turn, so the evidence reader now follows it to the parent's final answer. A real user message still ends the prior turn. Child-only answers, notification contents, and parent tool calls cannot satisfy parent completion.

Validation:

  • Added a synchronous transcript regression covering child completion → native notification → parent still using tools → final parent result. It fails against the reader on main and passes with this change; no sleeps or TUI fixtures added.
  • uv run --frozen pytest tests/test_cuj_evidence.py tests/test_e2e_cuj_helpers.py tests/test_integration_contract.py -q --disable-warnings: 275 passed.
  • CI-equivalent Ruff check/format and ty checks passed. CUJ4 collects all 17 cases.
  • Live agent/gateway CUJs were not run locally; CI validation is required.

Coverage READMEs describe the completed delegation-and-reply journey. The separate skill-toggle integration journey keeps its existing task-management UI check; CUJ4 no longer claims that coverage.

@lilly-luo lilly-luo changed the title Fix Claude task-view completion wait flake Verify completed delegation before exiting the smart-routing CUJ Oct 9, 2026
@lilly-luo lilly-luo closed this Oct 13, 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.

1 participant