Repository navigation
feat(session-flow): arm a fresh background session for step-away before the person leaves - #17435
Conversation
continue-in-background takes --step-away "<words>": the launch payload's first line becomes /session-flow:step-away <words>, so the background session arms its own absence under its own id and its Stop hook holds the completion condition. step-away's fresh-session step now hands off armed through it instead of unarmed. A live --bg probe is recorded in goal-probe.md. Co-authored-by: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a1e2cab2bd
ℹ️ 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".
Lane run report
Failed GitHub API calls
|
With --step-away and no goal region, the text after the leading command is the resume region's Read @ line (full path) or its between-rails text (prompt-only), and the completion condition gate's cases 2 and 3 do not apply on that path. Co-authored-by: Claude Opus 5.5 <[email protected]>
|
claude-security-review reviewed Security review: PR #17435, incremental from
|
|
claude-review reviewed Code review (incremental, blocking only):
|
|
The pr-verify verifier failed head What it wrote (41 lines)This pull request leaves the merge queue, and ci-status holds it out while it carries |
…g it After a --step-away launch, continue-in-background reads the launched session's full id and waits up to two minutes for away.py status to read active, reporting the session armed or arming unconfirmed, so a failed start in the unattended session is not reported as armed. Two lines still describing the /goal-only contract now name the launch payload. Co-authored-by: Claude Opus 5.5 <[email protected]>
…re the person leaves Replace the leading /session-flow:step-away first prompt with the owner's choice (a) on #17386: continue-in-background keeps the plain /goal payload and hands back the full sessionId it reads from claude agents --json, and step-away runs away.py start for that id from the attended session. A live probe (Claude Code 2.1.328) shows the first Stop read the state about 6 s after start; the window and its handling are recorded in goal-probe.md. away.py refresh now finds an unrecorded transcript by session id, since the background session's Stop hook did not record it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Drop the measured seconds from step-away's launch message, label the goal-keeps-it-working sentence as reasoning, and give the missing ignored .work/ path a fallback. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… report path No hook tells a background session armed after its launch where the away rules or the report are: its only prompt runs before `start`, and the Stop hook names the rules only when it blocks. The task file now opens with a header line naming the rules file by absolute path and, once `start` has printed it, the report path. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KeBVgaikHToyUB6YgDyVGn
Closes #17386
Summary
A step-away request for a fresh session used to hand off to a background session with no away rules, refusals or report. step-away now launches the background session through continue-in-background with the plain
/goalpayload, then arms it from the attended session while the person is still there:away.py start --session <the background session's full id>. This is the owner's decision Q228 option (a) on #17386; the earlier leading/session-flow:step-awayfirst-prompt design is reverted.Fix
claude agents --json --all, takes the entry whoseidis the short idclaude --bgprinted, and reports its fullsessionId(--bgignores--session-id, so this is the only source). When another skill invoked it through the Skill tool, it hands that id back instead of ending the task. The payload stays plain/goal; no new flag and no gate exception.done when every item in <task file> is done or marked parked(case 1 of its gate, no draft or confirmation), then runstartandstatusfor the returned id at once. No id back means not armed: say so and offer to arm this session.away.py refresh: when no hook recorded the transcript path, find<config>/projects/*/<session id>.jsonl. In the probe the background session's Stop hook never recorded the path, so without this the report's External actions block stayed empty.goal-probe.mdrecords the probe (probe 4); README sentence updated; eval case 20 replaced to cover the id hand-back.Verification
claude --bg --name <name> --permission-mode auto --setting-sources local --settings '{"worktree":{"bgIsolation":"none"}}' --plugin-dir <checkout>/plugins/session-flow "$(cat <payload>)", payload/goal every item in <task file> is ticked done or marked parkedplus one instruction line. Then, as separate tool calls,claude agents --json --allfor the full id andaway.py start --session <full id> --data-root <plugin data>/session-flow-inline.Goal set:and first prompt at 1.5 s (no away state yet);startwrote the state at 7.8 s; the away Stop hook rewrotestate.jsonat 13.7 s, so the first Stop read the state.start. The first prompt gets no away note, a permission prompt in the window is not refused, and actions beforestartare not in the report. A first turn ending in the window is not held, but the goal names the task file, so the session keeps going (reasoned, not observed). Documented in goal-probe.md.refreshwith the new fallback found the transcript (External actionsNone.instead of "not recorded yet").claude stop,claude rm,away.py end,away.py deliver; probe folder and report deleted.uvx --with pytest pytest plugins/session-flow/scripts/tests -q: 550 passed. New testtest_refresh_finds_an_unrecorded_transcript_under_projects.scripts/run-ruff.sh check <worktree>: all checks passed.check-skill.sh plugins/session-flow/skills: 20 passed, 0 failed (it skipped its own script tests because the shell's cwd was another checkout; pytest above covers them).validate-cases.py plugins/session-flow/evals: no failures, pre-existing warnings only. Pre-pushcheck-affectedpassed.Related
🤖 Generated with Claude Code