8000 New agents never start on first boot: --resume <name> opens a picker, and the session is never named (#23) by simon-inkie · Pull Request #55 · simon-inkie/inkie-deck · GitHub
[go: up one dir, main page]

Skip to content

New agents never start on first boot: --resume <name> opens a picker, and the session is never named (#23) - #55

Merged
simon-inkie merged 3 commits into
mainfrom
23-first-boot-agents-bv0u0h
Oct 11, 2026
Merged

simon-inkie merged 3 commits into
mainfrom
23-first-boot-agents-bv0u0h

Conversation

@simon-inkie
Copy link
Copy Markdown
Owner

Requested by Simon · project thread

Closes #23

Before: boot-agents.sh and workspace.sh launched a claude agent with
claude --resume <name> || claude. On a brand new agent --resume <name> does
not fail, it opens an interactive "No sessions match" picker and waits, so the
|| claude fallback never ran and a headless boot sat at the picker. A session
started any other way carried no name until someone typed /rename <name> in
it, and every later resume depended on that name.

After: each claude agent's session is pinned by id in
<agent home>/.session-id. A first boot mints a UUID, writes it, and launches
claude --session-id <id> -n <name>; later boots launch
claude --resume <id> -n <name>. The name is on the prompt border from the
first boot, so there is no /rename step and no picker. A pinned session whose
transcript is missing, or holds no messages, starts a fresh named session under
a new id rather than leaving a dead pane. An agent that predates the pin but has
a session someone named by hand is found by that name and pinned once, so it
resumes its conversation instead of starting over.

How: the logic lives in one new sourced file, packages/base/bin/claude-session.sh,
so the two launchers cannot drift. workspace.sh carried the identical launch
line and the same bug, so it is fixed here too. Nothing about the codex runtime
changes. boot-agents.test.sh gains seven cases: first boot, relaunch, missing
transcript, metadata-only transcript, corrupt pin, migration, and the
transcript-directory derivation. The base README and the pane sample in
INSTALL.md are updated.

SPEC: .specs/23-first-boot-agents-bv0u0h/SPEC.md

Test plan: boot-agents.test.sh passes 45 of 45, and the four paths above were
also checked live against Claude Code 2.1.292 in tmux with a scratch
AGENTS_HOME and CLAUDE_CONFIG_DIR. typecheck, check:boundaries,
check:leaks, check:licence, check:lib-version, check:dashes and the
deck test suite pass. Four base tests fail identically on main in the same
environment and are not from this change: the create-agent.test.ts
"CANNOT VERIFY when there is no runtime on PATH" case (a real claude is on
PATH there), and the inbox.test.sh, inbox-push.test.sh and
pane-idle.test.sh suites.

Known limitation, carried over: a pinned session that --resume rejects for
some other reason (a corrupt transcript, a CLI version mismatch) still leaves a
shell in the pane. Codex has a verify-and-fall-back step for this; claude does
not. It is in the SPEC's Follow-ups rather than widened into this change.

🤖 Generated with Claude Code

https://claude.ai/code/session_01V7UNCAsTAEN8Lq3qXWMLat


Generated by Claude Code

claude added 3 commits October 7, 2026 14:36
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
boot-agents.sh and workspace.sh ran `claude --resume <name> || claude`.
On a new agent --resume <name> opens a picker instead of failing, so the
fallback never ran and the session was never named. Both now pin the
session id in <agent home>/.session-id, launch a first boot with
--session-id <id> -n <name>, resume by id afterwards, start fresh when
the pinned transcript is gone or empty, and migrate a hand-named session
once.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
@simon-inkie simon-inkie self-assigned this Oct 7, 2026
@simon-inkie
Copy link
Copy Markdown
Owner Author

Review leg: Aggy (AI review agent). Verdict: ready to merge.
Checked: matches issue #23; pinned session UUIDs via claude-session.sh; empty-transcript recovery; prompt border named with -n; migration of existing named sessions; comprehensive unit tests pass; SPEC present and consistent; public-repo hygiene clean (UK English, no em-dashes).
Not verified: live interactive session with Anthropic Claude API backend on a clean machine.
Merge decision stays with the maintainer.

@simon-inkie
simon-inkie merged commit 76e6069 into main Oct 11, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New agents never start on first boot: --resume <name> opens a picker, and the session is never named

2 participants

0