Skip to content

fix(agent-core-v2): keep background questions open past turn end - #308

Open
elkaix wants to merge 2 commits into
fix/reconcile-rows-2026-09-10from
fix/reconcile-rows-b-2026-09-10
Open

fix(agent-core-v2): keep background questions open past turn end#308
elkaix wants to merge 2 commits into
fix/reconcile-rows-2026-09-10from
fix/reconcile-rows-b-2026-09-10

Conversation

@elkaix

@elkaix elkaix commented Sep 14, 2026

Copy link
Copy Markdown
Member

Related Issue

No tracked issue — internal reconciliation pass. Stacked on #307; review that one first (and #306 under it).

Problem

A background AskUserQuestion (asked with background: true) was bound to the asking turn: the moment the agent finished its turn, the question was cancelled and the user never got to answer it. When a background question was answered, the agent received only the path of a saved output file, not the answer itself.

What changed

  • Detached question requests no longer carry the asking turn's id, and turn-end cancellation leaves them pending; the question stays open until the user answers or dismisses it.
  • The answer is now delivered to the agent inline in the task notification — bounded to 16 KB and XML-escaped inside an <answer> block — instead of only a saved output path. Answered and dismissed outcomes get distinct notification text, and the transcript projection keeps background-question answers grouped with their turn.
  • docs/reference/tools.md documents the background behaviour on AskUserQuestion; two patch changesets included.
  • dist-web manifest restaged in the same commit (packages/transcript is a web build input; only .web-bundle-manifest.json changed).

Verification on this commit: full pre-push gate (597s, all checks passed), agent-core-v2 suite green, typecheck 0, lint 0, leak-check A–G PASS.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue (external PRs: the issue must have a maintainer's /approve).
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

A background AskUserQuestion was bound to the asking turn, so the question was
cancelled the moment the agent finished its turn and the user never got to
answer. Detached requests no longer carry the turn id, and turn-end
cancellation leaves them pending.

The answer now reaches the agent inline in the task notification instead of
only as a saved output path, bounded and xml-escaped.
@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • main

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: c254fa95-1d59-4811-a490-284fa81cb9e3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Sep 14, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@pymodel/pythinker-code@c12e7b3
npx https://pkg.pr.new/@pymodel/pythinker-code@c12e7b3

commit: c12e7b3

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