th-e651bc: auto-onboard every Claude session to th-mail + agentic self-rename#242
Merged
Conversation
🦋 Changeset detectedLatest commit: c1728c0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
brentrager
enabled auto-merge (squash)
July 22, 2026 16:52
…f-rename Previously only `th claude run` workers registered on the th-mail agent bus; a plain `claude` launch was invisible and unreachable. Now every session onboards at startup and can rename itself once it knows what it's doing. - `th agent rename --from <old> --to <new>` (smooth-pearls AgentRegistry::rename + CLI): moves the roster row AND re-addresses the agent's inbox/sent mail, so a placeholder handle can be promoted without losing history. Refuses to merge into an existing handle. 5 new tests. - register-agent.sh: register-always. Workers keep their meaningful SMOOTH_AGENT_HANDLE; a plain session gets a placeholder `cc-<repo>-<sid4>`, persisted to ~/.smooth/agent-sessions/<session_id>. The `th agent register` Dolt write (~0.7s cold-boot) is detached (`( … & )`) so it adds ~0ms to session start — measured 0.68s → 0.04s. - on-first-prompt.sh (new UserPromptSubmit hook): fires once to nudge the session to `th agent rename` itself to a task-meaningful handle. - No background `th msg watch` is auto-started — Dolt is single-writer, many watchers cause "database is read only". Push-watching stays opt-in via /th-mail. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ZctFb4oiWoJraHN2db1nX
brentrager
force-pushed
the
th-e651bc-agent-onboard
branch
from
July 22, 2026 16:57
5b33fed to
c1728c0
Compare
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.
Problem
Only
th claude runworkers registered on the th-mail agent bus. A plainclaudelaunch was invisible and unreachable by Big Smooth / other agents.Solution
Every session onboards at startup, then renames itself once it knows its task.
th agent rename --from <old> --to <new>(AgentRegistry::rename+ CLI) — moves the roster row and re-addresses the agent's inbox/sent mail, so a placeholder handle can be promoted without losing history. Refuses to merge into an existing handle. 5 new tests.register-agent.sh→ register-always — workers keep their meaningfulSMOOTH_AGENT_HANDLE; a plain session gets a placeholdercc-<repo>-<sid4>persisted to~/.smooth/agent-sessions/<session_id>.th agent registerDolt write cold-boots Dolt (~0.7s). Backgrounded (( … & )) so it adds ~0ms to session start (measured 0.68s → 0.04s).on-first-prompt.sh(newUserPromptSubmithook) — fires once to nudge the session toth agent renameitself to a task-meaningful handle.th msg watch— Dolt is single-writer; many always-on watchers cause "database is read only". Push-watching stays opt-in via/th-mail.Verification
cargo test -p smooai-smooth-pearls— 171 pass (5 new rename tests: mail-carry, collision-refuse, unknown-source, empty-target, noop-when-same).th agent renamecompiles; fmt + clippy clean (no new warnings).cc-<repo>-<sid4>, worker path preserved, first-prompt nudge fires exactly once, backgrounded register measured at 0.04s.🤖 Generated with Claude Code