Repository navigation
sminos guide: right member on /branch and in-session /resume; a fork told it is one (#99) - #269
Merged
Merged
Conversation
…ork is told the line above it was its parent's (#99, 7.188.10) The live check of board #99 (Claude Code 2.1.303) found two ways the session-start guide misses the session it starts: - `/branch` and an in-session `/resume` fire SessionStart while the engine's record still names the session they replace. The engine rewrites the record only once the SessionStart hooks return, so the guide's 1.5 s wait never saw the new session and printed nothing. The guide now reads the record of the engine running its hook (CLAUDE_PID, believed only when CLAUDE_CODE_SESSION_ID beside it is the payload's session), with the payload's session_title as the name when it gives one. - A fork's context holds its parent's guide, copied with the conversation. Asked who it was, a fork quoted both lines and would not choose (0/4 headless haiku runs). Its first line now says it is a fork and that any sminos line above it was written for the parent (4/4). Findings on the board (#99, board:693); the org-directory spec's Surprises & Discoveries and Decision Log record both. Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
Codex Review SummaryThis 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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…p to 7.188.11 Main took 7.188.10 with #270, so this branch moves to the next patch above it. No conflicts. Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
…narrow the Decision line to /branch (review of #269) The review's one P3: after an in-session /resume the engine renames the process from the resumed transcript's agent name, so a guide that took the payload's title or the process's name can name another alias than the one the log joins the session under. Logged in TECH-DEBT.md (T3) with its trigger; the Decision line now claims the title only for /branch and points at the entry. Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
…; bump to 7.189.1 Conflicts only in the version manifests: main's side taken (devcloud 0.4.2 with it), then bump-version.sh to 7.189.1, the next patch above main. Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Oct 19, 2026
…e-roster; bump to 7.189.2 Conflicts resolved: - cmd_guide: #269's guide_text(session, launch, source, session_title) call, with the roster's launch variable and its append around it. - test-guide.sh: #269's fork and engine-record cases and this branch's roster cases both kept, the roster's first. - The spec's Decisions: #269's, then the roster's, its follow-on. - CLAUDE.md's hooks/ row: main's line with the roster clause. - The version manifests: main's side, then bump-version.sh to 7.189.2. Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Oct 19, 2026
…ise-handle-form; bump to 7.189.2 Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Board #99 (spike): a live check of the sminos session-start guide on the real engine's
/clear, fork and compaction SessionStart paths, and the fix for what it found. The measurements are in the findings comment (board:693) and in the org-directory spec's Surprises & Discoveries (#99).What the live check found (Claude Code 2.1.303, plugin 7.188.8)
/clear,/compact,claude --resume <id> --fork-sessionandclaude --bg --resume <id>(a running session's fork): when the hook starts, the engine's record already names the session. The guide names the right member within 0.2–0.3 s./branchand an in-session/resume <id>: the engine's record still names the session being replaced, and it is rewritten only once the SessionStart hooks return. This was measured at +5.13 s behind a capture hook that blocked for 5 s, and at +1.63 s and +2.43 s behind the guide's own 1.5 s wait. The guide printed nothing. The branch's context then holds only its parent's copied guide, so the branch believes it is the parent.--fork-sessionsession quoted both lines and would not choose.The fix
sminos guidereads the record of the engine running its hook (CLAUDE_PID). The record is believed only whenCLAUDE_CODE_SESSION_IDbeside it is the payload's session; a pair inherited from an outer engine names another session. The session id is substituted in. The payload'ssession_titlebecomes the name when there is one (/branchpasses one); otherwise the process's own name stands. The facts the gate checks (kind, entrypoint, pid, the host's mark) belong to the process, so they are already the new session's. There is no wait on this path.--fork-sessioncontext, the fork was named 0/4 times without the clause and 4/4 with it.CLAUDE_CODE_SESSION_ID, no longer holds on 2.1.302+.Tests
tests/sminos/test-guide.shgains a fork case and a same-engine case:/branchwith a title,/resumewithout one, an inherited environment, aclaude -pengine, and an ended engine. Five of these cases fail on main and pass here.Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)