fix(agent-core-v2): keep background questions open past turn end - #308
Merged
Merged
Conversation
|
Warning Review limit reachedNext included review available in 19 minutes. View limit detailsLimit details: You’ve used all 3 included reviews currently available. Your 79 included PR review attempts over the past 7 days set your current allowance at 3 reviews per hour. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (15)
Comment |
commit: |
4 of 5 tasks
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.
elkaix
force-pushed
the
fix/reconcile-rows-b-2026-09-10
branch
from
September 15, 2026 00:30
09872d7 to
d1d880a
Compare
Merged
elkholy90
pushed a commit
that referenced
this pull request
Sep 15, 2026
## Related Issue No tracked issue — follow-on to the reconciliation stack (#307 / #308). ## Problem The minidb cluster suite shares the root vitest shard matrix. Under CI load, multi-process wait-read cases can time out even when they pass in isolation, and they slow every shard. ## What changed - Exclude `packages/minidb` from the root vitest `projects` glob (`!packages/minidb`). - Add a dedicated `test-minidb` CI job and require it in the aggregate `test` gate so coverage stays required. No product behavior change. No changeset (not user-facing). ## Checklist - [x] I have read the [CONTRIBUTING](https://github.com/PyModel/pythinker-code/blob/main/CONTRIBUTING.md) document. - [ ] I have linked a related issue (external PRs: the issue must have a maintainer's `/approve`). - [x] I have added tests that prove my feature works. - [x] Ran `gen-changesets` skill, or this PR needs no changeset. - [x] Ran `gen-docs` skill, or this PR needs no doc update.
elkaix
added a commit
that referenced
this pull request
Sep 15, 2026
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @pymodel/pythinker-code@2.0.0 ### Major Changes - [#306](#306) [`39b50b5`](39b50b5) Thanks [@elkaix](https://github.com/elkaix)! - Remote Control is always available — `pythinker rc`, `pythinker web --remote-control` and `/remote-control` no longer need an experimental flag. Session indexing and global search move to the new `[database]` section: set `PYTHINKER_CODE_PERSISTENCE_MINIDB_READMODEL` (was `PYTHINKER_CODE_EXPERIMENTAL_PERSISTENCE_MINIDB_READMODEL`) and `PYTHINKER_CODE_SEARCH_WORKER` (was `PYTHINKER_CODE_EXPERIMENTAL_SEARCH_WORKER`), or `[database] base` and `[database] search` in `config.toml`. - [#306](#306) [`39b50b5`](39b50b5) Thanks [@elkaix](https://github.com/elkaix)! - The subagent model pool is always available. Remove `PYTHINKER_CODE_EXPERIMENTAL_SECONDARY_MODEL` from your environment — it no longer does anything, and `[secondary_model]` takes effect with no opt-in. - [#306](#306) [`39b50b5`](39b50b5) Thanks [@elkaix](https://github.com/elkaix)! - Remove the `${now}` variable from custom system prompt templates. Delete `${now}` from your `SYSTEM.md` and agent files — the agent still receives the current date. ### Minor Changes - [#309](#309) [`3c21d16`](3c21d16) Thanks [@elkaix](https://github.com/elkaix)! - Add the `PYTHINKER_CODE_PERMISSION_MODE_REMINDER` environment variable: set it to a false value or an empty value to stop injecting the auto permission-mode reminders into the model context. - [#306](#306) [`39b50b5`](39b50b5) Thanks [@elkaix](https://github.com/elkaix)! - The server can now start and stop Remote Control while it runs, through `GET` and `POST /api/v1/remote-control`. ### Patch Changes - [#308](#308) [`ec99d66`](ec99d66) Thanks [@elkaix](https://github.com/elkaix)! - Deliver background question answers to the agent directly instead of via a saved output file. - [#308](#308) [`ec99d66`](ec99d66) Thanks [@elkaix](https://github.com/elkaix)! - Fix background questions being cancelled as soon as the agent finishes its turn. - [#313](#313) [`09d69fe`](09d69fe) Thanks [@elkholy90](https://github.com/elkholy90)! - Collapsed tool cards now show a short outcome row and a width-aware header. - [#307](#307) [`49548fb`](49548fb) Thanks [@elkaix](https://github.com/elkaix)! - Exclude time spent with the session closed from goal time budgets. - [#307](#307) [`49548fb`](49548fb) Thanks [@elkaix](https://github.com/elkaix)! - Preserve image and video filenames in session history. - [#307](#307) [`49548fb`](49548fb) Thanks [@elkaix](https://github.com/elkaix)! - Fix print mode (`pythinker -p`) ignoring the `PYTHINKER_DISABLE_TELEMETRY` environment variable. - [#306](#306) [`39b50b5`](39b50b5) Thanks [@elkaix](https://github.com/elkaix)! - The Remote Control banner's Local UI link now carries the server token, so it opens without a second sign-in. - [#306](#306) [`39b50b5`](39b50b5) Thanks [@elkaix](https://github.com/elkaix)! - Remote Control now gzips text, JSON, JavaScript, XML and SVG responses over the tunnel. - [#307](#307) [`49548fb`](49548fb) Thanks [@elkaix](https://github.com/elkaix)! - Remove the 24-hour limit on goal time budgets. - [#315](#315) [`a7666f8`](a7666f8) Thanks [@elkholy90](https://github.com/elkholy90)! - Skip the confirmation prompt for rm -rf commands that target only /tmp or /temp paths. - [#306](#306) [`39b50b5`](39b50b5) Thanks [@elkaix](https://github.com/elkaix)! - Global search now rebuilds its index instead of staying broken when the stored data is corrupt or a write keeps failing. - [#306](#306) [`39b50b5`](39b50b5) Thanks [@elkaix](https://github.com/elkaix)! - A background task that finishes after its agent is closed no longer emits stray task events. - [#307](#307) [`49548fb`](49548fb) Thanks [@elkaix](https://github.com/elkaix)! - Add `-y, --yes` to `pythinker upgrade` (alias `pythinker update`) to skip the confirmation prompt and install the update directly. ## @pymodel/pythinker-desktop@1.0.0 ### Major Changes - [#306](#306) [`39b50b5`](39b50b5) Thanks [@elkaix](https://github.com/elkaix)! - Remote Control is always available — `pythinker rc`, `pythinker web --remote-control` and `/remote-control` no longer need an experimental flag. Session indexing and global search move to the new `[database]` section: set `PYTHINKER_CODE_PERSISTENCE_MINIDB_READMODEL` (was `PYTHINKER_CODE_EXPERIMENTAL_PERSISTENCE_MINIDB_READMODEL`) and `PYTHINKER_CODE_SEARCH_WORKER` (was `PYTHINKER_CODE_EXPERIMENTAL_SEARCH_WORKER`), or `[database] base` and `[database] search` in `config.toml`. - [#306](#306) [`39b50b5`](39b50b5) Thanks [@elkaix](https://github.com/elkaix)! - The subagent model pool is always available. Remove `PYTHINKER_CODE_EXPERIMENTAL_SECONDARY_MODEL` from your environment — it no longer does anything, and `[secondary_model]` takes effect with no opt-in. - [#306](#306) [`39b50b5`](39b50b5) Thanks [@elkaix](https://github.com/elkaix)! - Remove the `${now}` variable from custom system prompt templates. Delete `${now}` from your `SYSTEM.md` and agent files — the agent still receives the current date. ### Minor Changes - [#309](#309) [`3c21d16`](3c21d16) Thanks [@elkaix](https://github.com/elkaix)! - Add the `PYTHINKER_CODE_PERMISSION_MODE_REMINDER` environment variable: set it to a false value or an empty value to stop injecting the auto permission-mode reminders into the model context. - [#306](#306) [`39b50b5`](39b50b5) Thanks [@elkaix](https://github.com/elkaix)! - The server can now start and stop Remote Control while it runs, through `GET` and `POST /api/v1/remote-control`. ### Patch Changes - [#308](#308) [`ec99d66`](ec99d66) Thanks [@elkaix](https://github.com/elkaix)! - Deliver background question answers to the agent directly instead of via a saved output file. - [#308](#308) [`ec99d66`](ec99d66) Thanks [@elkaix](https://github.com/elkaix)! - Fix background questions being cancelled as soon as the agent finishes its turn. - [#313](#313) [`09d69fe`](09d69fe) Thanks [@elkholy90](https://github.com/elkholy90)! - Collapsed tool cards now show a short outcome row and a width-aware header. - [#307](#307) [`49548fb`](49548fb) Thanks [@elkaix](https://github.com/elkaix)! - Exclude time spent with the session closed from goal time budgets. - [#307](#307) [`49548fb`](49548fb) Thanks [@elkaix](https://github.com/elkaix)! - Preserve image and video filenames in session history. - [#307](#307) [`49548fb`](49548fb) Thanks [@elkaix](https://github.com/elkaix)! - Fix print mode (`pythinker -p`) ignoring the `PYTHINKER_DISABLE_TELEMETRY` environment variable. - [#306](#306) [`39b50b5`](39b50b5) Thanks [@elkaix](https://github.com/elkaix)! - The Remote Control banner's Local UI link now carries the server token, so it opens without a second sign-in. - [#306](#306) [`39b50b5`](39b50b5) Thanks [@elkaix](https://github.com/elkaix)! - Remote Control now gzips text, JSON, JavaScript, XML and SVG responses over the tunnel. - [#307](#307) [`49548fb`](49548fb) Thanks [@elkaix](https://github.com/elkaix)! - Remove the 24-hour limit on goal time budgets. - [#315](#315) [`a7666f8`](a7666f8) Thanks [@elkholy90](https://github.com/elkholy90)! - Skip the confirmation prompt for rm -rf commands that target only /tmp or /temp paths. - [#306](#306) [`39b50b5`](39b50b5) Thanks [@elkaix](https://github.com/elkaix)! - Global search now rebuilds its index instead of staying broken when the stored data is corrupt or a write keeps failing. - [#306](#306) [`39b50b5`](39b50b5) Thanks [@elkaix](https://github.com/elkaix)! - A background task that finishes after its agent is closed no longer emits stray task events. - [#307](#307) [`49548fb`](49548fb) Thanks [@elkaix](https://github.com/elkaix)! - Add `-y, --yes` to `pythinker upgrade` (alias `pythinker update`) to skip the confirmation prompt and install the update directly. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Mohamed Elkholy <melkholy@techmatrix.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue
No tracked issue — internal reconciliation pass. Stacked on #307; review that one first (and #306 under it).
Problem
A background
AskUserQuestion(asked withbackground: 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
<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.mddocuments thebackgroundbehaviour onAskUserQuestion; two patch changesets included.dist-webmanifest restaged in the same commit (packages/transcriptis a web build input; only.web-bundle-manifest.jsonchanged).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
/approve).gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.