Files
g4borg f6dc43be19 ✨ export: 36 files (features)
M plugins/gitea/.claude-plugin/plugin.json
M plugins/gitea/.codex-plugin/plugin.json
M plugins/gitea/README.md
M plugins/gitea/skills/gitea/SKILL.md
M plugins/gitea/skills/gitea/scripts/fetch_ticket.py
M plugins/gitea/skills/gitea/scripts/start_ticket.py
A plugins/spire/UPGRADES.md
A plugins/spire/agents/designer.md
M plugins/spire/agents/planner.md
A plugins/spire/providers/README.md
A plugins/spire/providers/hosts/claude-desktop/spawning.md
A plugins/spire/providers/hosts/t3-code/spawning.md
A plugins/spire/providers/runtimes/codex/spawning.md
M plugins/spire/skills/gremlins/grm/call.py
M plugins/spire/skills/gremlins/grm/cli.py
A plugins/spire/skills/gremlins/grm/codex.py
A plugins/spire/skills/gremlins/grm/errors.py
A plugins/spire/skills/gremlins/grm/harness.py
M plugins/spire/skills/gremlins/grm/launch.py
A plugins/spire/skills/gremlins/grm/scrub.py
M plugins/spire/skills/gremlins/grm/stream.py
A plugins/spire/skills/gremlins/grm/title.py
A plugins/spire/skills/gremlins/tests/_pin.py
M plugins/spire/skills/gremlins/tests/fake_claude.py
A plugins/spire/skills/gremlins/tests/fake_codex.py
M plugins/spire/skills/gremlins/tests/test_cli.py
A plugins/spire/skills/gremlins/tests/test_cli_codex.py
A plugins/spire/skills/gremlins/tests/test_codex.py
A plugins/spire/skills/gremlins/tests/test_harness.py
A plugins/spire/skills/gremlins/tests/test_scrub.py
A plugins/spire/skills/gremlins/tests/test_title.py
A plugins/spire/skills/igor/references/upgrades.md
A plugins/spire/skills/igor/tests/test_upgrade_notes.py
A plugins/spire/skills/igor/upgrade-notes.sh
R plugins/spire/skills/implementation/references/spawning-claude-code.md -> plugins/spire/providers/runtimes/claude-code/spawning.md
M plugins/spire/skills/project/SKILL.md
2026-11-25 01:52:10 +01:00

73 lines
6.0 KiB
Markdown

# Spawning on Claude Desktop (Code tab)
Host layer over [the runtime file](../../runtimes/claude-code/spawning.md). Detection, legend, who reads what: [`../../README.md`](../../README.md).
## Versions seen
Desktop app build: unknown (not recorded). All claims read 2026-11-12 unless dated otherwise.
## Primitives
§n = section of the dirigent Desktop report.
| Primitive | What it is | Reaches the parent | Status |
|---|---|---|---|
| `Agent` | As the runtime file; in the tasks pane, not the sidebar | final report | verified 2026-11-12 (code.claude.com docs, §2) |
| `mcp__ccd_session__start_session`, `initiation: "user_asked"` | Full session, own transcript, sidebar row under the parent; user can open, steer, stop, archive it | after each child turn, a note quoting the first 400 chars of its latest report | verified 2026-11-12 (Desktop tool text, §3) |
| same, `initiation: "offer"` | "New session / Do it here" card; nothing runs until picked | as above once started | verified 2026-11-12 (Desktop tool text, §4). Docs call the button **Start** (minor diff) |
| same, `initiation: "own_initiative"` | Proposal card; expires after a week unstarted; `dismiss_task` withdraws it | as above once started | verified 2026-11-12 (Desktop tool text, §3-4). Expiry not in docs |
| `context: "fresh"` / `"fork"` | brief plus required `background` / copy of the parent conversation | n/a | verified 2026-11-12 (Desktop tool text, §3) |
| `use_worktree`, `target` (local, ssh, cloud), `cwd`, `preset`, `model`, `effort`, `permission_mode` (at most the parent's) | start options | n/a | verified 2026-11-12 (Desktop tool text, §3) |
| `SendMessage` to `local_…`; `mcp__ccd_session_mgmt__get_session`, `list_events`, `list_sessions {"linked": true}` | steer and inspect a linked child | n/a | verified 2026-11-12 (Desktop tool text, §3) |
| `mcp__ccd_session__hand_off_to_session` | moves the parent's task into its own session | n/a | verified 2026-11-12 (Desktop tool text, §3) |
## Visible vs in-process
`Agent` children are in-process, in the tasks pane, tied to the parent. Linked sessions are sidebar rows, independent, outlive the parent's turn, share no context after start (verified 2026-11-12, Desktop tool text). A child's note is its own claim, not proof.
## Worktree defaults
- `Agent isolation: "worktree"`: branches from the default branch, not the parent's HEAD (verified 2026-11-12, subagents docs).
- `use_worktree: true`: the linked session gets its own worktree; its base: unknown. `false`: shares the parent folder (verified 2026-11-12, Desktop tool text).
- With `false`, the PR badge follows the folder's branch, not the child's task (observed 2026-11-12: two sessions on one checkout both showed one PR, §3).
- Default of the new-session Worktree toggle: unknown (docs say off; a search snippet says on, §7.1).
## Wake and notification
- A `<side-sessions-event>` wakes the parent only when it is idle and no linked child is still working (verified 2026-11-12, Desktop tool text).
- The child can message the parent when it is blocked (verified 2026-11-12, Desktop tool text, §3).
- Cloud children never report back (verified 2026-11-12, Desktop tool text; docs agree).
- A message to a busy session waits; archived sessions receive nothing (verified 2026-11-12, desktop docs).
## Host rules that override Spire defaults
None known. Desktop adds tools; `Agent` is unrestricted.
## Spire use
Rules; Igor only. The Athanor never calls `mcp__ccd_session__*` or `mcp__ccd_session_mgmt__*`; Igor owns them (rests on: unknown "subagents see the session tools"; a child's notes would land in a session the Athanor does not own).
- **Default unchanged.** Igor dispatches as in the CLI: `Agent` for leaves, adepts, planner, advocate, reviewer and the single Athanor.
- **A linked side session beats a background `Agent` when:** (1) the user asks for a separate session or wants to watch or steer; (2) a parallel, independent workstream on disjoint code (a second ticket): `use_worktree: true`, one session per stream; (3) the work should outlive Igor's session or the user continues it by hand. Otherwise `Agent` (Igor synthesizes, needs a `subagent_type` pin, or resumes adepts).
- **Start options.** `initiation: "user_asked"`, `context: "fresh"` with a self-contained brief and `background`, `permission_mode` equal to Igor's, `model` named explicitly. Never `target: "cloud"` unasked (no report-back).
- **Brief shape.** The child is a session root: its agents' notifications reach it, not Igor. For case 2 the brief says "Dispatch `spire:athanor` foreground with `<brief file>`; when it returns, write the hand-back to `<path>`", and asks the child to open its final message with `<state>; output: <path>` inside 400 characters. Rests on: assumed "a linked child loads the same plugins and agent types".
- **Journal** each start: `local_…` id, purpose, worktree. On a note or wake, read the output file first.
- **Cards.** `offer` when the user asks for a session but not how to run it. `own_initiative` only after the user said yes to proposal cards this session. Dismiss stale cards Igor made (`dismiss_task`).
- **Never** `hand_off_to_session` unasked.
## Unknowns
| Item | Status |
|---|---|
| Worktree base of a linked session with `use_worktree: true` | unknown (§3) |
| A linked child loads the same plugins and agent types | assumed 2026-11-24 (same project folder and settings; not tested) |
| A linked child can spawn its own linked sessions | unknown (§7.4) |
| Subagents see `mcp__ccd_session__*` | unknown (not probed) |
| 400-char note, wake rule and one-week expiry stay stable | unknown (undocumented, §7.3) |
| `Agent` nesting depth: docs say 3 layers, setup observed "generally not" | unknown (docs differ, §2; runtime docs row: [`../../runtimes/claude-code/spawning.md`](../../runtimes/claude-code/spawning.md) Limits) |
| Desktop app build | unknown |
## Sources
dirigent workpad (separate repo): `reports/2026-11-12-10-claude-desktop-sessions-and-subagents.md` ("dirigent Desktop report"); docs: code.claude.com `desktop`, `subagents`.