Repository navigation
feat(sessions): organize visible sessions through agent tools - #126146
vyctorbrzezowski wants to merge 16 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed August 24, 2026, 4:59 PM ET / 20:59 UTC. ClawSweeper reviewWhat this changesThis PR adds batch category/unread updates and additional organization metadata to the agent-facing session tools. Merge readinessKeep open: the branch adds useful session-organization capability, but it regresses the documented Priority: P3 Review scores
Verification
How this fits togetherAgent session tools turn model requests into visibility-scoped Gateway calls. The Gateway authorizes and commits session-state updates, then the tools return bounded results and session-list projections to the model. flowchart LR
A[Model session request] --> B[Agent session tools]
B --> C[Visible target resolution]
C --> D[Gateway authorization]
D --> E[Session mutation engine]
E --> F[Persisted session state]
F --> G[Bounded tool result]
Decision needed
Why: VISION.md treats every core tool and prompt line as a per-call product cost, while the related category request was explicitly awaiting product direction. Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +244, Tests +290, Docs +1, Other +10. Total +545 across 19 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the canonical Gateway batch owner, restore the complete list-tool documentation, remove the duplicate category spread, and land only after maintainers approve the new core model-tool surface. Do we have a high-confidence way to reproduce the issue? Yes for the review findings: comparing the branch with current main directly reproduces the missing documentation contract and duplicate property. No live batch Gateway run was performed in this read-only review. Is this the best way to solve the issue? No: reuse of the existing Gateway batch owner is the right boundary, but the branch must preserve the established list contract and receive an explicit decision on the new core tool surface. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5775cd3dfaf4. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
86c6d92 to
66d7a13
Compare
5766393 to
d9e67a1
Compare
Related: #126064 and #126074
Stacked on #126094.
What Problem This Solves
Current main supports single-session category set/clear, but organizing many matching sessions still requires one model/tool round trip per session and the agent cannot inspect unread, owner, project/worktree-presence, icon, or active status/attention metadata through the focused list output.
Why This Change Was Made
Rebased onto #126074, which owns the single-session category contract. This PR retains only the distinct additions:
unreadon the existing single-session patch action;patch_manyfor category/unread updates to at most 100 visible targets;sessions_listwithout paths or full worktree objects.The adapter routes directly to canonical
sessions.patchMany, preserving current visibility plus snapshot and commit-time authorization. Results are bounded counts plus failures; oversized failure details are omitted under the existing tool-result budget.User Impact
Agents can inventory organization metadata and update up to 100 visible sessions in one model tool call.
Evidence
All validation ran remotely; no tests, checks, builds, mock servers, or runtime proof ran on the development host.
tbx_01m0brx1kpmqzg3yn9g7fzb71j: 67/67 focused tests passed; 100 category patches completed in 526 ms with one entry-replacement batch and zero full transcript hydration.tbx_01m0c0dnnvk4jca07nwadyvf4w: touched-file lint passed with 0 findings.tbx_01m0c3xyypn9c353kf88yrkbw5: rebased stack, 56/56 agent-tool tests and 3/3 batch performance tests passed; 100-session batch completed without transcript hydration.tbx_01m0bskt65cprttppxwhm4t3x3:{ "before": null, "patch": {"status":"updated","updated":["category"]}, "afterPatch": "Research", "clear": {"status":"updated","updated":["category"]}, "afterClear": null, "authorization": "Session status visibility is restricted to the current session tree" }Provenance
The session self-service tool was introduced in
e905a682f7a. #126074 supplies the now-current single-category parity. This PR reuses the existing batch Gateway owner for the remaining bulk/unread and organization-projection capability.Production-vs-test LOC
Production/docs: +258/-8. Tests/test fixtures: +252/-18. No duplicate mutation engine, persistence path, protocol method, config surface, or migration.