Repository navigation
fix(j5): an agent's question shows once in the Inbox after a server restart - #1018
Merged
Merged
Conversation
…estart A restart leaves an unanswered question answerable by message, and the resumed turn asks it again, so the thread holds two pending questions and the Inbox listed both. The Inbox now lists one question row per thread, the one the agent is waiting on if any, since the row only links to the thread, which shows one question at a time. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
This review includes 2 billable files and costs up to $0.50.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 53 minutes for your next included review. View limit details
|
Jacksondr5
commented
Nov 11, 2026
Jacksondr5
left a comment
Owner
Author
There was a problem hiding this comment.
Combined review: reviewer-opus and reviewer-sol (Claude Opus 5.5 and GPT Sol 6.1), head 122e10a
Both of us reviewed the PR independently. Neither found anything that blocks merge.
- The policy.
nativeQuestionInboxReadlists one row per thread. It takesquestions.findLast(live) ?? questions.at(-1)over the pendinguser_inputrequests that can be answered live or by message. - Order. "Last" is the newest: the projection loads runtime requests
ORDER BY created_at ASC, runtime_request_id ASC(ProjectionStore.ts). - Filters. Per-thread scoping and the pending, kind and capability filters are kept. The Captain, Crew-seat and archived exclusions are unchanged.
- Test. The new test (a
messagequestion, then a live re-ask, gives one live row) failed on trunk. 25nativeQuestionInboxReadtests pass. The bell's count drops by the duplicate, which is correct.
Code approval: the panel has no open code findings. Still pending: green J5 CI.
This branch was successfully deployed
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.
Problem
After a test server restarted, Jackson's Inbox showed the same agent's question twice: the old row ("Asked a question while continuing its work") and the new one ("Waiting for an answer to continue"). Answering one removed both. Part of #1010 (item 3).
Cause
Two upstream behaviours combine, and J5's read listed the result as it stood. J5 stores no stale link of its own; it reads the thread's pending requests live.
ProviderRuntimeRecoveryServicekeeps an unanswered question pending but switches it toresponseCapability: "message", so it can still be answered by message or dismissed.The thread then holds two pending questions. Upstream's composer shows them one at a time (
pendingUserInputs[0]). J5'snativeQuestionInboxReadlisted every pending question, so the Inbox showed both, and the bell counted both. Upstream keeps the old question on purpose, so this isn't an upstream bug.What changed
The Inbox lists one "Agent questions" row per thread:
It's done on the server in
nativeQuestionInboxRead.ts, so web and mobile both get it.Tests: a new case in
nativeQuestionInboxRead.test.tslists a thread with amessagequestion and a later live one as one live row. It failed on trunk with two rows.Live testing
Pending, from the crew tester: restart a test server while a real Haiku agent waits on its provider's question, and check for one row after the turn resumes.
Checklist
Built by Claude Opus 5.5 in Claude Code (J5 crew seat builder-identity).
🤖 Generated with Claude Code