GeezerVison is showing github.com — fix(composer): preserve authored text in prompt recall by juliusmarminge · Pull Request #10102 · pingdotgg/t3code
Conversation
Closes #10056.
Human approval required. Please do not auto-merge this proposal.
ArrowUp guesses which parts of a saved message were generated. It can remove a literal Ultrathink: prefix or context markup the user wrote. Identical text can have different origins, so the final string cannot reliably tell us what to keep.
Record authored text ranges before adding generated prefixes and context. Recall reconstructs those ranges and any whitespace removed by the existing send-time trim. Provider-facing text stays unchanged. Optional metadata follows events, SQLite, snapshots, optimistic messages and mobile sends/outbox recovery. This includes the already merged mention-source fix in #10100.
Closes #10056.
Decisions for review
- Unknown or legacy provenance recalls the full stored text. This avoids deleting authored content but can expose generated context in old messages. No backfill or text-based guess. Known generated-only messages are excluded from history; invalid ranges fall back to unknown.
- Editable text counts as authored, including picker-inserted prefixes. Existing visual mention chips are unchanged.
- New sends require the optional
composerRecall server capability. Metadata uses a nullable SQLite column. Older clients keep their existing behavior and may discard optional outbox metadata.
- Range count follows chip count. There is no second full-prompt field, but copied edge whitespace is uncapped. For the tested 50,000-character prompt, metadata was 22 serialized bytes in SQLite and added 40 bytes to message JSON. This is not a storage-page or constant-cost claim.
Verification
Reviewed 8c603df7 against 761d4bac, September 5, 2026.
- 601 focused tests pass: 74 server, 171 shared/contracts/mobile, 356 web. Server, web and mobile typechecks pass. Coverage includes committed events, SQLite/reopen/migration, snapshots, queue recovery, actual send assembly and Lexical serialization.
- Real-client history controls pass for literal prefixes, whitespace, generated terminal context and identical text typed literally, including backward/forward navigation and returning to empty.
- A fresh native Send stored 52 characters plus two spaces at each edge. The saved message, unique completed simulated turn and checkpoint agree across read-only SQLite, real client events and the HTTP snapshot. Recall restores all 56 characters, including after reload. No provider account/model was called.
- The latest-main client repeatedly recalls only 40 characters from that same message. The comparison below uses identical data and viewport with the same isolated candidate backend. It proves the client difference, not a full main-backend comparison. The fresh send separately exercises the candidate client, commands, events and SQLite.
Web and desktop share the recall UI. Mobile propagation has focused tests, not native phone verification, and gains no ArrowUp UI. No real-provider, relay or older-client runtime claim is made.
Before
The literal prefix and whitespace disappear during recall.

Before recording
After
Recall preserves the authored prefix and whitespace.

After recording
GPT 6 Astra via Codex in T3 Code.
Note
Preserve authored composer text in prompt recall via ComposerRecall metadata
- Adds a shared
ComposerRecall contract and utilities in composerRecall.ts that record authored UTF-16 ranges and boundary whitespace so generated context (ultrathink prefixes, terminal/element blocks, review markup) can be stripped on recall instead of heuristically guessed
- Server persists recall in a new nullable JSON column via migration 048 in 048_ProjectionMessageComposerRecall.ts; the decider, projector, projection pipeline, and snapshot queries all carry and retain recall through message lifecycle events
- Web and mobile clients attach
composerRecall to sends, optimistic messages, and outbox records when the environment advertises the capability in environment.ts; prompt history and outbox recovery now reconstruct authored text from stored metadata
- Removes the old
recallableComposerPrompt heuristic helper from composerPromptHistory.ts
- Risk: projection upsert and streaming-append in ProjectionThreadMessages.ts clear stored recall on text-changing updates and preserve it only for empty completions; migration 048 adds a column to
projection_thread_messages that existing rows leave null
Macroscope summarized 2643377.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
macroscopeapp
Bot
commented
Sep 5, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Approvability
Verdict: Not approved
Macroscope's review found this PR not approvable — This change introduces a cross-layer prompt-recall capability with new client/server metadata, durable SQLite persistence, migration logic, and user-visible behavior. It is also enabled by default in the server environment, making the scope broader than an isolated bug fix.
Notes:
- Diff unchanged. Approvability was decided on eligibility alone.
You can add or adjust custom eligibility rules. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Thread transfer impact
✅ Thread transfer remains within every enforced ceiling.
| Provider |
Metric |
Main baseline |
This PR |
Impact |
PR ceiling |
|
| Codex |
Total thread wire |
13.5 KiB |
13.5 KiB |
+24 B (+0.2%) |
15.1 KiB |
✅ |
| Codex |
Thread snapshot wire |
7.0 KiB |
7.0 KiB |
0 B (0.0%) |
7.3 KiB |
✅ |
| Codex |
Live turn WebSocket wire |
6.5 KiB |
6.5 KiB |
+24 B (+0.4%) |
7.8 KiB |
✅ |
| Codex |
Live turn WebSocket decoded |
57.0 KiB |
57.0 KiB |
0 B (0.0%) |
66.4 KiB |
✅ |
| Codex |
Live turn messages |
8 |
8 |
0 (0.0%) |
21 |
✅ |
| Claude |
Total thread wire |
13.6 KiB |
13.6 KiB |
+28 B (+0.2%) |
15.1 KiB |
✅ |
| Claude |
Thread snapshot wire |
7.0 KiB |
7.0 KiB |
−2 B (−0.0%) |
7.3 KiB |
✅ |
| Claude |
Live turn WebSocket wire |
6.5 KiB |
6.6 KiB |
+30 B (+0.4%) |
7.8 KiB |
✅ |
| Claude |
Live turn WebSocket decoded |
57.8 KiB |
57.9 KiB |
+44 B (+0.1%) |
66.4 KiB |
✅ |
| Claude |
Live turn messages |
9 |
10 |
+1 (+11.1%) |
21 |
✅ |
Baseline: 761d4ba · PR result: 2643377 · Source CI: success
Scenario and decoded snapshot size
10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
- Codex decoded thread snapshot: 113.8 KiB
- Claude decoded thread snapshot: 114.5 KiB
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Bugbot is paused — on-demand spend limit reached
Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.
A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Pushed the test-only CI correction in 26433773. The contracts test now uses the schema JSON codec and retains tuple types. The package typecheck and all 52 orchestration contract tests pass independently. Only that test file changed, so production code is byte-identical to the native-tested 8c603df7. Update, September 5 at 13:16 UTC: new-head CI, Effect and UI checks pass. Approvability remains neutral and explicitly requires human review.
The filtered plan-follow-up warning is a false positive. deriveComposerSendState removes inline placeholders before the caller constructs followUp.text. With a terminal placeholder between a and b, the sent text is ab with ranges [[0, 2]]; recall preserves b. The two existing assembly tests pass with multiple placeholders, edge whitespace, and both plain and Ultrathink-prefixed text. No production change or suppression was needed for this finding.
Human approval is still required for the recall policy, capability and persistence changes. This is not merge approval and does not resolve #10056.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks for working on this. We merged the orchestrator V2 rewrite in #2829, and we are closing this PR as part of that transition.
This change touches ProjectionPipeline.ts, ProjectionSnapshotQuery.ts, decider.ts, which the V2 merge removed. V2 uses new commands, contracts, projections and orchestration services.
Sorry for the extra work this creates. If the change is still needed on V2, please rebuild it on current main, verify it there, and open a new PR linking back here. We're closing the current implementation without assuming the underlying request is resolved.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
macroscope-review
Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews
size:L
100-499 changed lines (additions + deletions).
vouch:trusted
Author is trusted by repo permissions or the VOUCHED list.
Milestone
No milestone
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.
|