Skip to content

Prefer chat names in agent session labels#2346

Open
sirwazzles wants to merge 1 commit into
steipete:mainfrom
sirwazzles:agent/chat-origin-session-labels
Open

Prefer chat names in agent session labels#2346
sirwazzles wants to merge 1 commit into
steipete:mainfrom
sirwazzles:agent/chat-origin-session-labels

Conversation

@sirwazzles

@sirwazzles sirwazzles commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • keep the originating Codex chat name primary in descriptive agent-session labels
  • append approval/subagent task context when available, for example Dependency audit · Approval review
  • retain task-only fallbacks and cap composed labels at 64 characters
  • add regression coverage for guardian, subagent, and long combined labels

Follow-up to #2273.

Live behavior proof

The same local session metadata was scanned by the installed CodexBar 0.45.0 CLI and by the freshly built branch CLI. Output is reduced to provider and sessionName, with private chat and task text replaced by numbered placeholders.

Before, installed 0.45.0:

[
  {"provider":"codex","sessionName":"[worker task 1 redacted]"},
  {"provider":"codex","sessionName":"Approval review"},
  {"provider":"codex","sessionName":"Approval review"},
  {"provider":"codex","sessionName":"Approval review"}
]

After, this branch:

[
  {"provider":"codex","sessionName":"[chat name 1 redacted] · [worker task 1 redacted]"},
  {"provider":"codex","sessionName":"[chat name 2 redacted] · Approval review"},
  {"provider":"codex","sessionName":"[chat name 3 redacted] · Approval review"},
  {"provider":"codex","sessionName":"[chat name 4 redacted] · Approval review"}
]

This demonstrates both paths: subagent task names now retain their originating chat, and guardian labels no longer collapse unrelated chats into repeated Approval review rows.

Validation

  • swift build --scratch-path /private/tmp/codexbar-chat-origin-build --product CodexBarCLI with the compatible macOS 15.4 SDK
  • freshly built CodexBarCLI sessions --json against local session metadata produced the chat-first labels above
  • SwiftFormat lint: 0 files require formatting
  • SwiftLint on the two changed files with SourceKit-disabled rules: 0 violations
  • make check: all portable and SwiftFormat checks passed; local SwiftLint could not load sourcekitdInProc.framework
  • focused swift test --filter CodexSessionRolloutTests could not run locally because this Command Line Tools installation does not provide the Swift Testing module; GitHub CI provides the execution gate
  • GitHub CI passed lint, both macOS Swift-test shards, Linux x64 build/tests, and the static Linux musl build
  • the Linux arm64 matrix job failed only in unrelated CLICardsClaudeSwapTests when its temporary fake executable could not launch; the same arm64 job passed on the prior PR run, and GitHub requires repository admin rights to rerun it

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. labels Jul 19, 2026
@clawsweeper

clawsweeper Bot commented Jul 19, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed July 19, 2026, 5:20 PM ET / 21:20 UTC.

Summary
Changes Codex descriptive agent-session labels to make the originating chat title primary, append task or guardian context, truncate composites at 64 characters, and add focused regression coverage.

Reproducibility: not applicable. as a conventional bug reproduction: this PR proposes a presentation-semantic change, and the before/after CLI output in the PR body clearly demonstrates the affected paths.

Review metrics: 1 noteworthy metric.

  • Patch scope: 2 files affected; 78 added, 10 removed. The change is contained to one label formatter and its focused rollout tests, making the product decision—not implementation breadth—the main merge question.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Confirm whether changing existing descriptive-mode sessionName strings to chat-first semantics is the intended product contract.

Risk before merge

  • [P1] Users and scripts that consume sessionName while using an existing descriptive label mode will receive different strings after upgrade, even though the Project compatibility default remains unchanged.

Maintainer options:

  1. Approve the visible label-contract change (recommended)
    Accept chat-first output as the intended semantics for existing descriptive modes and merge with the current Project-mode default preserved.
  2. Pause for compatibility policy
    Keep the current task-first behavior until a maintainer confirms that changing descriptive sessionName values is acceptable.

Next step before merge

  • [P2] A maintainer must choose the compatibility contract for existing descriptive-label output; there is no safe mechanical repair to dispatch before that choice.

Maintainer decision needed

  • Question: Should existing descriptive agent-session modes switch to chat-first labels and accept the resulting sessionName output change for users who already selected those modes?
  • Rationale: The patch is small and technically coherent, but whether a title or task name is the primary identity is a user-visible compatibility and UX policy choice rather than a mechanical defect.
  • Likely owner: sirwazzles — They introduced the merged descriptive-label feature and have the strongest concrete context for the intended label semantics.
  • Options:
    • Adopt chat-first descriptive labels (recommended): Merge the PR and define the chat title as the primary human-facing label, with task or guardian context appended when useful.
    • Preserve task-first descriptive labels: Keep the current guardian and subagent task-name priority if existing descriptive output should remain stable for users and integrations.

Security
Cleared: The two-file Swift formatter-and-test change introduces no dependency, secret, permission, build, or supply-chain surface.

Review details

Best possible solution:

Adopt one explicit descriptive-label contract: use the chat title as the human-facing identity and append task or guardian context only as disambiguating detail, while retaining the existing Project-mode default.

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

Not applicable as a conventional bug reproduction: this PR proposes a presentation-semantic change, and the before/after CLI output in the PR body clearly demonstrates the affected paths.

Is this the best way to solve the issue?

Unclear pending maintainer intent: the implementation is the narrowest way to make chat identity primary, but only maintainers can choose whether that compatibility tradeoff is the desired contract.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against f8636cb37eb0.

Label changes

Label justifications:

  • P3: This is a small, optional descriptive-label UX refinement rather than a failure of the default session-label workflow.
  • merge-risk: 🚨 compatibility: The patch deliberately changes strings emitted by existing descriptive modes and exposed through session JSON.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body supplies redacted, after-fix live CodexBarCLI sessions --json output from the same local metadata and directly shows the changed label behavior.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies redacted, after-fix live CodexBarCLI sessions --json output from the same local metadata and directly shows the changed label behavior.
Evidence reviewed

What I checked:

Likely related people:

  • sirwazzles: The related merged implementation established configurable descriptive agent-session labels, and this PR modifies the same label-selection path. (role: introduced the merged descriptive-label feature and authored this focused follow-up; confidence: high; commits: 6614faed5245, e63390f390dc; files: Sources/CodexBarCore/AgentSession.swift, Tests/CodexBarTests/CodexSessionRolloutTests.swift)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (2 earlier review cycles)
  • reviewed 2026-07-19T20:33:28.985Z sha 11f5bc7 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-19T20:50:53.308Z sha e63390f :: needs maintainer review before merge. :: none

@sirwazzles
sirwazzles marked this pull request as ready for review July 19, 2026 20:40
@clawsweeper

clawsweeper Bot commented Jul 19, 2026

Copy link
Copy Markdown

ClawSweeper status: review started.

I am starting a fresh review of this pull request: Prefer chat names in agent session labels This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@sirwazzles
sirwazzles force-pushed the agent/chat-origin-session-labels branch from 11f5bc7 to e63390f Compare July 19, 2026 20:47
@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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