Skip to content

fix: keep session titles stable after the opening task - #185337

Merged
steipete merged 2 commits into
mainfrom
codex/remove-title-refinement
Oct 27, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/remove-title-refinement

Conversation

@steipete

@steipete steipete commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Later prompts could unexpectedly rename a Dashboard conversation after six follow-up tasks, replacing the sidebar title without an explicit rename.

User Impact

A conversation keeps the title inferred from its opening task. Only an explicit rename through sessions.patch changes it afterward. Existing session rows with the retired refinement marker still load; no Doctor action is needed.

Why This Change Was Made

Delete the countdown, recent-context title generation, overwrite path, persisted marker, and obsolete tests. Keep the existing title owner for first-task naming and explicit patches for renames. Preserve registered-skill task selection from #174317 because initial naming still needs it.

Remove the unshipped sessions.create.displayNameGenerated input from the schema, generated validators, Dashboard callers, and pending-placement reader. The releases v2026.10.7 and v2026.10.10-beta.3 did not contain it, so no shipped protocol contract requires compatibility. A pending browser placement draft from the unreleased refinement implementation may be discarded by validation; existing session database rows remain readable.

Related: #174317.

Evidence

The Gateway-handler regression creates an automatically named conversation, sends seven follow-ups, and explicitly renames it through sessions.patch. On the base it fails because the title becomes Land PR and archive instead of retaining Release planning. The legacy-row admission regression also fails on the base because it exposes the retired marker.

Focused checks pass: 66 Gateway/storage tests, 41 UI domain tests, and all three existing title-page browser cases. Core/UI typechecks, targeted oxlint, formatting, and git diff --check pass on the original implementation. The follow-up schema and placement-recovery suites pass all 28 tests. Compiled protocol validators were regenerated with pnpm gateway:validators:gen; pnpm protocol:gen also succeeds. Follow-up core/UI typechecks, targeted oxlint, formatting, and git diff --check pass. Exact-head CI is being checked before landing.

The focused Gateway/storage invocation took 250.08 seconds including worker compilation and teardown; UI proof took 29.91 seconds including the browser build. The seven-follow-up regression took 19.255 seconds; its existing creation-title file totals 44.451 seconds of reported case time because it also covers worktree failures and remote-session lifecycle. That RPC/storage boundary catches the original unsolicited rename; a cheaper helper-only test would miss caller scheduling. The older-row decoder case reported 0ms in the passing run. Follow-up schema/recovery proof took 38.47 seconds across three files.

Proof uses isolated synthetic state and fixed model output; no production Gateway, real user state, or external model service is involved. No rendering or styling code changes. The existing browser cases cover initial-title creation; the seven-follow-up stability regression runs at the Gateway handler boundary.

CI classification

Exact head 73e0b51e6e21c0bf833e993df04b2c68b3002c1e is mergeable. CI run 40442632933, attempt 1 is complete: 71 jobs passed, 21 skipped; only checks-node-changed-extensions-bundle-5 and its aggregate gate failed. All three PostgreSQL conformance jobs passed.

The iMessage failure is pre-existing on main. The coordinator reproduced the same rich-link final-delivery case and expected-one-send assertion on unchanged main at merge base ce503a58dad3b06cfba1cc357bab3e5a0435f024 and on this exact PR head: both runs returned 1 failed / 2 passed. Native requests were send then chats.list. Main push CI does not select that changed-extensions shard, explaining the automatic report's unknown classification. No iMessage source or assertion is changed here. A separate lane owns its repair.

Coordinator classification and landing authorization. Landing uses the native pre-existing-failure exception, retaining the failed CI result and all review/security gates. No CI rerun was requested.

The final change removes 235 net lines across 24 files: production +20/-173 (net -153), tests +44/-125 (net -81), documentation +3/-4 (net -1).

@clawsweeper

clawsweeper Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime size: M labels Oct 27, 2026
@steipete
steipete marked this pull request as ready for review October 27, 2026 02:29
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T03:12:57.087558Z 73e0b51 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9c424bedfd

ℹ️ 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".

Comment on lines 201 to 202
"displayName",
"titleRefinement",
"delivery",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the retired title field reserved for plugin slots

A plugin registering sessionEntrySlotKey: "titleRefinement" is now accepted because this key is removed from the reserved list without being added to RETIRED_SESSION_SLOT_KEYS. However, patchPluginSessionExtension in src/plugins/host-hook-state.ts writes the projected value into that top-level field, and the updated projectCanonicalSessionEntryShape unconditionally strips it during persistence. The patch therefore reports success while its promised session-entry projection disappears. Move the key into the retired-key set so registration rejects this unusable slot, as it does for other retired fields.

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 27, 2026
@clawsweeper

clawsweeper Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

This PR removes automatic title refinement after follow-up messages while preserving initial naming and explicit renames.

Example: A conversation starts as “Release planning” and receives seven follow-up requests to land and archive a PR.

  • Before: Automatic refinement can replace its title with “Land PR and archive”.
  • After: The title remains “Release planning” until an explicit rename.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The maintainer-backed reduction is coherent and has focused regression coverage, but one plugin contract defect and the stored-state compatibility gate remain.
Proof confidence 🦐 gold shrimp (3/6) The ordinary contributor-proof gate does not apply to this maintainer-authored PR. Supplied coverage exercises the changed owner through a handler harness; inspected screenshots belong to the earlier refinement implementation. Stored-state compatibility remains unproven through an upgrade from v2026.10.7 preserving settings, session data, and titles; the synthetic legacy-row decoder case alone does not clear that gate.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Product

Kind: Preference · Worth it: Yes · Fix scope: Complete
User problem: A familiar sidebar title changes after later tasks without an explicit rename.
Reason: Refinement was intentional behavior, but this maintainer-authored PR explicitly chooses stable opening-task titles and removes the machinery cleanly.

Merge readiness

⛔ Blocked before merge - 3 items remain

Keep open: this maintainer-backed simplification restores stable titles, but the retired field becomes a valid plugin slot whose projection is silently discarded.

Priority: P2
Reviewed head: 9c424bedfd42c62ccda9dee022a33e1d804d5dd9

Before merge

  • Keep titleRefinement reserved after retiring the field (P2) - Removing this reservation makes a plugin registration with sessionEntrySlotKey: "titleRefinement" succeed. patchPluginSessionExtension then writes its projected value into that top-level field, but projectCanonicalSessionEntryShape now unconditionally strips it during persistence, so the patch returns success while the advertised projection disappears. Move the key into RETIRED_SESSION_SLOT_KEYS and extend the existing reserved-slot registration case.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.
  • Explain or restore the original intent of Retired plugin-slot reservations - 8ee1d04: Retired core fields remain reserved so plugin projections cannot collide with historical or stripped session data.

Findings

  • [P2] Keep titleRefinement reserved after retiring the field — src/plugins/session-entry-slot-keys.ts:201-202

Provenance

  • Retired plugin-slot reservations changes intended behavior without addressing why it exists (8ee1d04: Retired core fields remain reserved so plugin projections cannot collide with historical or stripped session data.)

Tests

  • Missing end-to-end proof: The seven-follow-up scenario exercises Gateway handlers with fixed model output rather than a shipped Gateway/model run; the body reports red-on-base and green-on-head results.
Agent review details

How this fits together

The Control UI supplies opening-task title inputs to Gateway session creation; the existing naming owner generates and persists a display name that session projections deliver to the sidebar and header.

flowchart LR
  A[Control UI opening task] --> B[Session creation]
  B --> C[Existing title owner]
  C --> D[Title model]
  D --> E[Guarded session write]
  E --> F[Sidebar and header]
  G[Explicit rename] --> E
Loading

Technical review

Best possible solution:

Keep initial naming and explicit renames under their existing owners, and move titleRefinement into the existing retired plugin-slot set.

Do we have a high-confidence way to reproduce the issue?

Current main visibly counts eligible follow-ups and permits one generated-title replacement; the PR reports a handler regression failing on the base and passing on the head, which this read-only review did not execute.

Is this the best way to solve the issue?

Deleting refinement from the existing naming owner is the smallest complete implementation of the approved direction; client-input compatibility is retained, but the retired slot reservation must also remain.

Full review comments:

  • [P2] Keep titleRefinement reserved after retiring the field — src/plugins/session-entry-slot-keys.ts:201-202
    Removing this reservation makes a plugin registration with sessionEntrySlotKey: "titleRefinement" succeed. patchPluginSessionExtension then writes its projected value into that top-level field, but projectCanonicalSessionEntryShape now unconditionally strips it during persistence, so the patch returns success while the advertised projection disappears. Move the key into RETIRED_SESSION_SLOT_KEYS and extend the existing reserved-slot registration case.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 46a4495487f2.

Provenance checked

  • Automatic follow-up refinement and persisted marker changes intended behavior with a stated reason (eb6a328: fix(naming): refine generated Dashboard titles once #174317 intentionally refined generated Dashboard titles once after six follow-up tasks.)
  • Shared naming ownership and initial-task selection keeps the original intent (f8b8956: refactor: consolidate session title request ownership #153871 consolidated joining, retry, settlement, and guarded persistence under the existing naming owner.)
  • Prepared creation-title compatibility changes intended behavior with a stated reason (eb6a328: The optional displayNameGenerated input distinguished automatic prepared names for refinement; this PR explains why existing clients and saved requests must still be accepted.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test src/plugins/contracts/session-entry-projection.contract.test.ts --maxWorkers=1
  • git diff --check

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 85b8a9b adds src/gateway/session-title-state.ts:20 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 85b8a9b8ea36; files: src/gateway/session-title-state.ts)
  • Daniil Karpenko: Raw commit eb6a328 adds src/gateway/dashboard-session-title.ts:20 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: eb6a328b7e8d; files: src/gateway/dashboard-session-title.ts)
  • xingzhou: Raw commit 27d6c88 adds src/gateway/dashboard-session-title.ts:5 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 27d6c8816721; files: src/gateway/dashboard-session-title.ts)

PR surface

Source -145, Tests -81, Docs -1. Total -227 across 22 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 15 20 165 -145
Tests 6 44 125 -81
Docs 1 3 4 -1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 22 67 294 -227

Review metrics

Metric Value Why it matters
Production versus tests Production +20/-165; tests +44/-125 The reduction removes refinement machinery and obsolete coverage while adding a handler-level stability regression.

Labels

Label changes:

  • add P2: Unexpected conversation renaming affects navigation, and the introduced plugin projection defect has a narrow repair.
  • add merge-risk: 🚨 compatibility: The changed plugin registration contract admits a historical field whose projection persistence discards.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: Unexpected conversation renaming affects navigation, and the introduced plugin projection defect has a narrow repair.
  • merge-risk: 🚨 compatibility: The changed plugin registration contract admits a historical field whose projection persistence discards.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 26, 2026, 10:48 PM ET / October 27, 2026, 02:48 UTC.

@steipete

Copy link
Copy Markdown
Contributor Author

The iMessage failure is pre-existing on main. The coordinator reproduced settles rich-link final delivery through actual provider, hooks, and SQLite (true) on unchanged main at merge base ce503a58dad3b06cfba1cc357bab3e5a0435f024 and on PR head 73e0b51e6e21c0bf833e993df04b2c68b3002c1e: both returned 1 failed / 2 passed, with the same expected-one-send assertion (send followed by chats.list). Main push CI does not select this changed-extensions shard; a separate lane owns its repair.

Exact-head CI run 40442632933 is complete. All other jobs passed or skipped, including all three PostgreSQL conformance jobs; the aggregate gate is red from this failure. The coordinator authorizes the native pre-existing-failure squash-landing exception. No CI rerun was requested.

@steipete
steipete merged commit 3d06494 into main Oct 27, 2026
165 of 169 checks passed
@steipete
steipete deleted the codex/remove-title-refinement branch October 27, 2026 04:18
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 27, 2026
* fix: keep session titles stable after the opening task

* fix(protocol): remove unshipped generated title flag
@dankarization

Copy link
Copy Markdown
Contributor

Follow-up proposal: #197334 brings the reset and refinement behavior together for Telegram private topics and Dashboard conversations.

The intended flow is simple: the first real task names the conversation; six follow-up task messages give the utility model one chance to improve the current name. Commands do not count. After /reset, the first real task compares its subject with the existing name and keeps that name when it still fits, including manual wording. A later manual rename or reset wins over an older pending model result.

This deliberately revisits the removal in #185337 rather than adding a separate, competing refinement path. Related context: #184821, #174317 and #183368. The proposal is deployed locally for testing. The new PR includes focused tests and a real Telegram screenshot showing a retained topic name through reset, model selection and the next ordinary message; full live refinement coverage is not claimed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants