Repository navigation
feat(sessions): keep useful names after context resets - #197334
dankarization wants to merge 16 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6abe1d3818
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -67,9 +73,12 @@ export function scheduleChatDashboardSessionTitle( | |||
| cfg: params.cfg, | |||
| agentId: params.agentId, | |||
| sessionId: params.admittedSessionId, | |||
| lifecycleRevision, | |||
There was a problem hiding this comment.
Pass the Talk session revision to the title scheduler
For Talk voice transcripts on a session with a stored lifecycle revision, appendTalkClientTranscript (talk/client-transcript.ts:30-36) still calls this scheduler without entry. This now forwards an own lifecycleRevision property whose value is undefined, so the new Object.hasOwn guard in maybeGenerateSessionTitle rejects the live row before doing any title work. Voice-only Dashboard/iOS/node conversations therefore stop receiving opening titles, and post-reset reassessments never run. Update the Talk caller to pass its already-read entry so the captured revision reaches the title writer.
Useful? React with 👍 / 👎.
| if (current.label?.trim()) { | ||
| patch.label = name; |
There was a problem hiding this comment.
Validate label ownership before persisting a reassessed name
During a reset or six-message reassessment, if the model proposes a name already used as another session's custom label in the same store, this assignment creates duplicate labels. It bypasses the existing isLabelInUse check in applySessionsPatchDisplayMetadata, and the SQLite label index is non-unique, so the write succeeds. Subsequent sessions.resolve({ label: ... }) requests then fail with Multiple sessions found with label (sessions-resolve.ts:599-602). Apply the existing label-claim validation before changing label, or retain the current label when the generated name is occupied.
Useful? React with 👍 / 👎.
|
Codex review: needs real behavior proof before merge. What this changesThis PR reassesses Dashboard and Telegram conversation names after reset and six follow-up tasks, including manually chosen names. Example: Reset a conversation named Email, then ask to plan a Lisbon trip.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⛔ Blocked before merge - 4 items remain Keep this PR open for an owner decision: it deliberately revisits the stable-title policy, and Telegram custom-label replacement still has a correctness defect. Priority: P2 Decision needed
Before merge
Findings
Tests
Agent review detailsHow this fits togetherDashboard messages, Talk transcripts, and Telegram topic messages enter the existing naming owners, which call the utility model and persist session presentation and naming lifecycle metadata. flowchart TD
A[Dashboard and Talk input] --> C[Dashboard naming owner]
B[Telegram recorded input] --> D[Telegram naming owner]
C --> E[Shared naming planner]
D --> E
E --> F[Utility model comparison]
F --> G[Session and topic persistence]
Technical reviewBest possible solution: Use the existing naming and label-claim owners for any approved lifecycle, with the first-message repair available as a smaller independent change. Do we have a high-confidence way to reproduce the issue? The central request changes naming policy rather than establishing a current-main regression; the introduced Telegram collision is source-verifiable, and no target code was run. Is this the best way to solve the issue? The existing naming owners are appropriate, but automatic replacement of manual names needs an explicit product decision, and Telegram must share the label-claim invariant already enforced by Dashboard. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6f6bf91812ca. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +778, Tests +1640, Docs +28, Other +5. Total +2451 across 55 files. Added test files: 4. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (3 earlier review cycles)
Reviewed November 12, 2026, 2:13 AM ET / 07:13 UTC (Revision 4). |
6abe1d3 to
68247c6
Compare
|
@clawsweeper re-review Updated head |
|
🦞👀 Re-review progress:
|
|
🦞👀 Re-review progress:
|
|
Fixed the remaining Telegram label collision in b946370. The topic now claims a custom label through the same storage owner as Dashboard before Telegram is renamed. If another session owns that label, both existing names stay as they are. A failed Telegram rename restores our own unchanged title write without overwriting a later reset or manual edit. All 27 focused Telegram naming/ownership/recovery tests passed, along with core, extension and extension-test types, targeted typed lint, formatting and the test-line budget. That is local proof for this commit; I have not deployed this last repair yet. I’m still working through the merge conflict and the separate P3 test split. The earlier live screenshots cover the first-message/reset workflow, not this new collision case. |
…ersation-label-refinement-20261111 # Conflicts: # src/agents/cli-runner/cli-run-transcript.test.ts
|
Review follow-up for The prior head's CI job timed out in an existing native-hook relay approval test. The full file passed locally on the prior head (97/97), and the same test passed in hosted CI on this head in 173 ms. The timeout did not recur; its underlying cause remains unproven. The current built-CLI CI proof failed because the concurrent session changed before deletion. The related fix remains in the open companion PR. Other checks are running; the product decision, current Dashboard proof, and existing-state upgrade proof remain open. |
Preserve committed-input naming notifications alongside upstream admission and session metadata changes.
…laceholder coverage
|
On current head Exact-head CI run 43411084733 failed in eight jobs; the failure causes and their relationship to this PR remain unproven. The latest substantive hosted reviews predate this head. CI and review are not yet complete for readiness. |
What Problem This Solves
Resetting context should not destroy a useful conversation name. Commands such as
/modelshould never become its title.User Impact
The first real message gives a new Telegram topic or Dashboard conversation a name. This includes Telegram’s New Thread flow, where sending a message creates an implicitly named “New Chat”.
After six follow-up user messages, the utility model compares the opening message and those follow-ups with the current name. After
/reset, it compares the first real message with the existing name. A fitting broad name such as “YouGile” stays exactly as it is for related work; the model replaces it only when the subject no longer fits.Commands, bot replies and child-agent output do not count. Manual edits win over naming attempts already in flight.
Why This Change Was Made
I usually reset a topic to continue the same work with fresh context. Having to restore its old name by hand defeats that workflow.
Naming now starts from approved, recorded user input, without waiting for the agent’s answer. Blocked or hidden input cannot trigger it. Queued messages count individually when their approved text is unchanged; if a hook rewrites the combined input, only that approved result is used. Opening media stays associated with its accepted message.
Related: #184821, #174317, #183368. Reassessing a manually chosen title changes the stable-title policy from #185337 and needs a maintainer decision.
Evidence
The approved-input follow-up passed 113 focused tests in six files, core types, five affected test type graphs, scoped lint, formatting and line budgets. It was then merged with main at
e60207216. On the resulting tree9f86524d, 36 transcript and queue tests, core types, formatting and scoped typed lint passed. An independent review of the three manual conflict resolutions found no P0–P2 issues. A later test-only follow-up removes duplicated fixtures while retaining the in-flight “New Chat” race: 15 lifecycle tests, formatting and the test-line budget against frozene602passed. Hosted CI for the current head is separate.These screenshots are from the earlier integrated build
b2b6eb7, not this public head:First real message:
Reset, model selection and the same subject:
Reset and a different subject:
Messages, timings and limits.
The lifecycle retains bounded excerpts of the opening input and up to six follow-ups; that retention proposal needs maintainer review. Older lifecycles without those excerpts use a bounded transcript fallback. Delayed Telegram title edits retain the existing arrival-order behavior; the original live manual-rename mismatch was not captured well enough to prove its cause.
The behavior is now running in my local integration
644e178; that build also carries other patches. This is separate from exact-public-head live acceptance and hosted CI. The manual-title policy and bounded input retention still need maintainer review.