Skip to content

fix: name sessions started with skill commands - #173664

Merged
fuller-stack-dev merged 3 commits into
mainfrom
fix/session-title-topic-source
Oct 16, 2026
Merged

fuller-stack-dev merged 3 commits into
mainfrom
fix/session-title-topic-source

Conversation

@fuller-stack-dev

@fuller-stack-dev fuller-stack-dev commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes sessions remaining named ‘New session’ when the first task is sent through a registered skill command, or an earlier control-only message precedes the task.

User Impact

User impact: task-bearing skill conversations receive automatic sidebar titles, while control-only conversations remain unnamed. Explicit names and attachment-derived titles are preserved. No configuration or migration is required.

Why This Change Was Made

Select title text through the same registered skill-command metadata used for dispatch, and select the first usable task consistently across in-memory and persisted history. Keep per-attempt command metadata out of the stable sidebar title cache.

Evidence

  • Reproduced registered-skill and control-first failures before the fix; regression paths pass afterward.
  • 87 Gateway tests passed, including actual sessions.title.prepare, sessions.create and chat.send handlers, persisted titles and title-change broadcasts.
  • 24 transport tests passed using an isolated local provider, including empty/reasoning-only output fallback, attachment handling, registered commands and control-only conversations.
  • 8 in-memory history tests passed; durable reader coverage verifies registry-sensitive selection and cache isolation.
  • Core typecheck, changed-file lint, formatting and full build passed.
  • Live Gateway configuration and sessions were not changed; no production-provider inference was used for functional tests.

All touched test files were audited: retained distinct routing, authority, cancellation, persistence and fallback cases; removed duplicate mocking and redundant single-case table branches; shared the existing local-provider fixture instead of bypassing production title generation.

Independent API-direct review completed. Both raised concerns were checked against the owning code: skill discovery already applies the effective agent allowlist in resolveCommandSkillLoadOptions; both memory and durable title readers intentionally preserve the existing 100-event prefix budget. The fix does not remove that bound, and a current task can still supply the title when history has no usable source. No review-suggested production changes were necessary.

Additional graph typechecking passed Gateway, agent, infra, state/logging, command, plugin/platform, config/CLI, messaging and service graphs before the bounded overall run terminated; this is not a full test-graph typecheck pass. Broad proof is left to PR CI.

CI exposed two affected boundary fixtures, now repaired with red-before/green-after proof: the native wrapper inventory includes the 15 new transitive sources (both closure tests pass), and the discussion timeout test waits for actual inference to start before advancing fake time (all 8 discussion tests pass; late settlement notifications remain asserted). That entire test file was audited and an identical duplicate mock removed. Fresh API-direct review of this repair delta reported no actionable findings.

@clawsweeper

clawsweeper Bot commented Oct 16, 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 gateway Gateway runtime size: L labels Oct 16, 2026
@fuller-stack-dev
fuller-stack-dev marked this pull request as ready for review October 16, 2026 02:37
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Oct 16, 2026
@fuller-stack-dev
fuller-stack-dev enabled auto-merge (squash) October 16, 2026 02:52
@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. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. 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 16, 2026
@clawsweeper

clawsweeper Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

The PR generates session titles from registered skill-command arguments and skips earlier control-only messages.

Example: Start a dashboard session with the registered command /topic_proof Fix missing sidebar titles.

  • Before: The slash-command filter leaves the session named “New session.”
  • After: The title generator receives “Fix missing sidebar titles” and persists a generated name.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is coherent and has meaningful boundary coverage, with confidence limited to harness-based behavioral evidence.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; supplied validation covers registered skills, control-first history, persisted names, and events through Gateway handlers and a real HTTP transport fixture.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Sessions started with a task-bearing skill command, or preceded by a control message, can retain “New session” instead of a useful automatic name.
Reason: The maintainer-authored direction restores useful naming through existing owners without introducing configuration, public API, or storage changes.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR addresses a current title-selection defect, and review found no actionable correctness or security findings.

Priority: P2
Reviewed head: 958b92acd25611a4e48a5d071de78f5dfb7bf701

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No shipped Gateway or UI trace is supplied; the inspected proof uses real handlers and transport within test harnesses.
Agent review details

How this fits together

Gateway creation and chat handlers pass messages into the title owner, which selects bounded task text from current input or session history, requests a label, and stores displayName for session presentation.

flowchart TD
A[Creation and chat requests] --> B[Session title owner]
C[Registered skill commands] --> D[Shared task source selector]
E[Memory or durable history] --> D
B --> D
D --> F[Existing label generator]
F --> G[Session displayName]
G --> H[Sidebar and session events]
Loading

Technical review

Best possible solution:

Retain the shared registered-command selector and existing title persistence owner, then land through the normal CI gates.

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

Current main visibly rejects registered slash-command starts and retains an earlier control message as the historical source; this read-only review did not execute target code.

Is this the best way to solve the issue?

The implementation repairs source selection through the existing dispatch parser and both history backends while preserving explicit-name precedence, attachment handling, worker ownership, and bounded reads.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 5e2975df3778.

Provenance checked

  • Automatic title eligibility changes intended behavior with a stated reason (27d6c88: The original feature excluded commands so control messages would not become session topics; the PR explicitly distinguishes registered commands carrying task arguments.)
  • Historical title reads and cache keeps the original intent (03440e1: The history worker owns bounded transcript-title reads, keeping SQL off Gateway execution and retaining cache bounds.)
  • Memory-backed history keeps the original intent (3de654b: Incognito history belongs to the memory actor and must not fall back to durable storage.)
  • Fallback and explicit-name preservation keeps the original intent (8c8aab1: Automatic naming must preserve manual names and provide useful presentation when model labeling is unavailable.)
  • Provider source framing keeps the original intent (8c939f5: The shared label generator must describe the supplied source rather than injected harness context.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 03440e1 adds src/gateway/session-transcript-title-reader.worker.ts:47 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 03440e154594; files: src/gateway/session-transcript-title-reader.worker.ts)
  • xingzhou: Raw commit 27d6c88 adds src/gateway/dashboard-session-title.ts:30 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 27d6c8816721; files: src/gateway/dashboard-session-title.ts)
  • Donnie Fiander: Raw commit 8c8aab1 adds src/gateway/dashboard-session-title.ts:122 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 8c8aab1de800; files: src/gateway/dashboard-session-title.ts)

PR surface

Source +78, Tests +349, Other +15. Total +442 across 18 files. Added test files: 2.

View PR surface stats
Area Files Added Removed Net
Source 10 133 55 +78
Tests 7 567 218 +349
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 15 0 +15
Total 18 715 273 +442

Labels

Label changes:

  • add P2: Missing automatic names make affected sessions harder to identify without blocking chat or changing stored user content.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Missing automatic names make affected sessions harder to identify without blocking chat or changing stored user content.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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 15, 2026, 11:02 PM ET / October 16, 2026, 03:02 UTC.

@fuller-stack-dev
fuller-stack-dev merged commit 2b1f0f5 into main Oct 16, 2026
140 checks passed
@fuller-stack-dev
fuller-stack-dev deleted the fix/session-title-topic-source branch October 16, 2026 03:32
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Merged via squash.

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

Labels

gateway Gateway runtime P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant