✨ 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
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
# Providers
|
||||
|
||||
A **runtime** is the agent engine that runs Spire's text (Claude Code, Codex). A **host** is the app around it that may add session tools (Claude Desktop, T3 Code). Paths below are relative to this file.
|
||||
|
||||
Under Codex, `${CLAUDE_PLUGIN_ROOT}` is not substituted: the plugin root is the parent of the `skills/` root Codex shows for a skill (a skill's SKILL.md is `<root>/skills/<name>/SKILL.md`). Do not search elsewhere.
|
||||
|
||||
- [`runtimes/claude-code/spawning.md`](runtimes/claude-code/spawning.md): dispatch, resume, models, Rules of thumb (owner)
|
||||
- [`runtimes/codex/spawning.md`](runtimes/codex/spawning.md): dispatching into Codex
|
||||
- [`hosts/claude-desktop/spawning.md`](hosts/claude-desktop/spawning.md): Desktop session layer
|
||||
- [`hosts/t3-code/spawning.md`](hosts/t3-code/spawning.md): T3 threads and delegates
|
||||
- `hosts/codex-desktop/`: planned, nothing known
|
||||
|
||||
## Detection (reading, not calling)
|
||||
|
||||
Igor reads its tool names, deferred ones included. Spire's agents load only in Claude Code, so the runtime is claude-code. Spire also ships a Codex manifest exposing `skills/`; whether Codex loads them and expands the plugin-root path variable is unknown, and Igor under Codex is unsupported in 0.4.0.
|
||||
|
||||
| Tool names present | Host | Read |
|
||||
|---|---|---|
|
||||
| any `mcp__ccd_session__*` or `mcp__ccd_session_mgmt__*` | claude-desktop | runtime + `hosts/claude-desktop/` |
|
||||
| any `mcp__t3-code__*`, or a tool ending in `orchestrator_capabilities` or `delegate_task` | t3-code | runtime + `hosts/t3-code/` |
|
||||
| neither, no other session-layer server | none | runtime only |
|
||||
| both, or an unlisted session-layer server | unclear | runtime only |
|
||||
|
||||
- A session-layer server has tools that create, start, launch, send to or hand off sessions, threads, tasks or agents (e.g. `mcp__claude-code-remote__*`). Other MCP servers do not affect detection.
|
||||
- **Unclear: do not guess.** Use runtime primitives only, tell the user once which signals you saw, ask which host this is. Never call a host spawn tool on a guess.
|
||||
- Journal once: `Harness: runtime claude-code, host <host> (signal: <tool name>)`.
|
||||
- Re-detect after a resume on another machine, when a host tool fails as absent, and when a session-layer tool first appears in the tool or deferred-tool list. While the pair is `none`, re-read the tool list once before the first background `Agent` dispatch (hosts load tools late).
|
||||
- Env vars are not a signal.
|
||||
|
||||
## Who reads what
|
||||
|
||||
Igor reads the runtime file and the detected host file, plus the Codex runtime file when delegating to Codex. Zathras follows Igor's rule by reference. The Athanor reads the runtime file only and never calls host spawn tools (Desktop `mcp__ccd_session*__*`, T3 `delegate_task`, threads, any `mcp__t3-code__*`); Igor owns them. Leaf agents read nothing here; their briefs carry what they need.
|
||||
|
||||
## Status legend
|
||||
|
||||
Each claim carries a status and a date.
|
||||
- **verified**: read from tool schema text, host system-prompt text or vendor docs that date; not runtime-tested unless the row says so.
|
||||
- **observed**: seen in real runs, source given; mechanism may be assumed.
|
||||
- **assumed**: inferred, unchecked.
|
||||
- **unknown**: open; check before relying on it.
|
||||
|
||||
Host files open with "Versions seen"; a row that depends on a version names it. A claim fails: fix the row with a new date.
|
||||
|
||||
## Path rule
|
||||
|
||||
Skill and agent bodies point here as `${CLAUDE_PLUGIN_ROOT}/providers/<axis>/<name>/<topic>.md`. Files read with `Read` use relative links; other reference files write `providers/...` plus "(plugin root)".
|
||||
@@ -0,0 +1,72 @@
|
||||
# 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`.
|
||||
@@ -0,0 +1,78 @@
|
||||
# Spawning on T3 Code
|
||||
|
||||
Host layer over [the runtime file](../../runtimes/claude-code/spawning.md). Detection and legend: [`../../README.md`](../../README.md).
|
||||
|
||||
## Versions seen
|
||||
|
||||
T3 Code (Beta) 0.1.11 with Claude 2.1.330 and Codex 0.171.0 (dirigent T3 tools report §2).
|
||||
|
||||
## Primitives
|
||||
|
||||
§n = dirigent T3 tools report; "lineage" = dirigent T3 lineage report; "bundle" = tool text and system-prompt rules of the 0.1.11 app.
|
||||
|
||||
| Primitive | What it is | Reaches the parent | Status |
|
||||
|---|---|---|---|
|
||||
| native `Agent` (Claude runtime) | provider's own subagent, in-process, same provider, no extra settings | final report | verified 2026-11-23 (bundle, §1) |
|
||||
| `delegate_task` | child thread run by T3, "no parent history"; any provider and model from `orchestrator_capabilities` | completion wakes the parent; `task_status` returns `summary`, marks it delivered | verified 2026-11-23 (bundle, §1-2); wake observed (lineage §3) |
|
||||
| `orchestrator_capabilities` | lists providers, models, options, runtime modes | n/a | verified 2026-11-23 (bundle, §2); returned live, observed (lineage §2) |
|
||||
| `t3_thread_launch` | new top-level thread; `workspaceStrategy`, `modelSelection`, first `message` | nothing; pull with `t3_thread_wait` / `t3_thread_read` | verified 2026-11-23 (bundle, §3); flat, steerable: observed (lineage §3) |
|
||||
| `create_threads` | several top-level threads here; "Not delegation" | as above | verified 2026-11-23 (bundle, §3) |
|
||||
| `t3_thread_send` (`auto`/`queue`/`steer`/`restart`), `_interrupt`, `_read`, `_wait` | drive a thread | n/a | verified 2026-11-23 (bundle, §3) |
|
||||
| `task_cancel` | stops a delegate, its delegates, PR watches; never `t3_thread_interrupt` its `childThreadId` | n/a | verified 2026-11-23 (bundle, §2) |
|
||||
| `t3_background_wait` | keeps the thread Working during background Bash; Claude and OpenCode only; not for `Agent` or delegate ids | n/a | verified 2026-11-23 (bundle, §2) |
|
||||
|
||||
## Visible vs in-process
|
||||
|
||||
- Native `Agent` is in-process. A `delegate_task` child shows only in the parent's right-hand panel (no tree in the left list), is one-shot, and records `parentThreadId` plus `relationshipToParent: "subagent"` (observed 2026-11-23, lineage §3-4).
|
||||
- A launched thread is a flat top-level peer, steerable, with no parent recorded even with `delegatedFrom` (observed, lineage §3). No reparenting either way; the title is the only free-text handle (observed, lineage §5-6).
|
||||
- A native general-purpose subagent saw `mcp__t3-code__*` (observed 2026-11-23, §1).
|
||||
|
||||
## Worktree defaults
|
||||
|
||||
- `delegate_task isolation: "worktree"`: new checkout from the parent commit; uncommitted edits stay out. `"shared"` (default): the parent checkout. Unsupported for remote delegation (verified 2026-11-23, bundle, §1, §8).
|
||||
- `t3_thread_launch workspaceStrategy: "worktree"`: from `baseRef`, default `origin/<default>` with `startFromOrigin: true`. Omitted `workspaceStrategy` = project root, not the caller's worktree (verified 2026-11-23, bundle, §3, §10).
|
||||
|
||||
## Wake and notification
|
||||
|
||||
- Delegate completion is injected into the parent thread; its `next` says "Completion wakes this thread. Do not wait on it or poll it." (observed 2026-11-23, lineage §3).
|
||||
- `mode: "wait"` caps at 45 s; a timeout does not cancel. Threads: pull only (verified 2026-11-23, bundle, §2-3).
|
||||
|
||||
## Host rules that override Spire defaults
|
||||
|
||||
T3 puts these in the system prompt; they win over Spire defaults. All verified 2026-11-23 (bundle, §1-3, §10).
|
||||
- Never a background native `Agent`; background work goes through `delegate_task`. Collides with a background Athanor (see Spire use).
|
||||
- New threads only when the user asks; "subagent", "delegate", "parallel" never mean one.
|
||||
- Call `orchestrator_capabilities` once per thread before the first `delegate_task`. Unavailable provider or model: say so, never fall back silently.
|
||||
- Do not poll delegates (`task_status`, `sleep`, Monitor).
|
||||
- Each delegate review or re-check is a new `delegate_task`, never a send to the old one.
|
||||
- Mention a thread by its `link`, verbatim.
|
||||
- Children and launched threads cannot exceed the caller's permission modes.
|
||||
- As a subagent or child, do the work yourself; start no subagents unless the task says to.
|
||||
|
||||
## Spire use
|
||||
|
||||
Rules; Igor only. The Athanor never calls any `mcp__t3-code__*` tool (`delegate_task`, threads); Igor owns them (rests on: unknown "whose thread wakes for a delegate a native subagent started").
|
||||
|
||||
- **Native `Agent`, foreground**: anything needing a Spire agent type (pin, skills, `SendMessage` resume): planner, advocate, reviewer, adepts, researcher, search, scout, the Athanor.
|
||||
- **`delegate_task`, `mode: "async"`**: another provider or model (Codex review), user-asked settings (effort max), a separate checkout from the parent commit, or a leaf run in the background. Self-contained brief: agent body pasted (e.g. `agents/reviewer.md`), input files, output path, hand-back headings; no secrets; at most 120k chars. A Codex child has no Spire (read [the Codex file](../../runtimes/codex/spawning.md) first); a Claude child gets the body pasted too, since `delegate_task` takes no agent type (rests on: assumed Claude-delegate row).
|
||||
- Before `isolation: "worktree"`, commit what the child must see; `"shared"`: the child writes only its output path. After a wake, read the output file.
|
||||
- **The Athanor in T3.** Igor dispatches it as a foreground native `Agent` (no background `Agent` here). Igor tells the user it blocks until hand-back. Assumed default; Athanor-as-delegate awaits a probe. Igor's brief says the Athanor runs its own subagents (the child rule may reach it).
|
||||
- **Threads.** `t3_thread_launch` only when the user asks for a thread or peer. Always set `workspaceStrategy`. Title `[igor] <topic>`; journal id and `link`.
|
||||
- **Background Bash.** Before ending a turn on background Bash, Igor calls `t3_background_wait` (task id).
|
||||
- **Supervision.** Children inherit full-access (observed, lineage §3). `runtimeMode: "approval-required"` only on user request (rests on: assumed row below).
|
||||
- **Not used by Spire in 0.4.0**: PR and issue tools, `request_secret`, `html_render`, previews, devices, `schedule_task`, linked environments, `t3_worktree_handoff`, `t3_thread_transfer`.
|
||||
|
||||
## Unknowns
|
||||
|
||||
| Item | Status |
|
||||
|---|---|
|
||||
| Whose thread wakes for a delegate started by a native subagent | unknown (untested) |
|
||||
| A Claude delegate child loads Spire | assumed 2026-11-24 (not tested) |
|
||||
| `SendMessage` resume of an adept is not a background `Agent` under T3's rule | assumed 2026-11-24 (Igor waits; adepts reply in one turn) |
|
||||
| A send to a finished delegate keeps its context | unknown (untested; lineage §3) |
|
||||
| `approval-required` children behave as supervised | assumed 2026-11-23 (lineage §3, untested) |
|
||||
| `t3-thread://` handled by the OS | unknown (untested; lineage §7) |
|
||||
|
||||
## Sources
|
||||
|
||||
dirigent workpad (separate repo): `reports/2026-11-23-11-t3-code-mcp-tools.md` ("dirigent T3 tools report"); `reports/2026-11-23-16-t3-code-threads-lineage-and-links.md` ("dirigent T3 lineage report").
|
||||
@@ -0,0 +1,85 @@
|
||||
# Spawning agents in Claude Code
|
||||
|
||||
Harness mechanics: dispatch, resume, fork. Other hosts: see the convention in [`../../README.md`](../../README.md).
|
||||
|
||||
Status legend: [../../README.md](../../README.md)
|
||||
|
||||
## Rules of thumb
|
||||
|
||||
Owner of the harness rules; Igor, Zathras and the Athanor point here.
|
||||
|
||||
- **Foreground for sequential work.** Next step depends on the result: `run_in_background: false`. Background `Agent` children only for independent leaves whose result may go to the session root. Background Bash is fine for gremlins (it notifies the subagent that started it).
|
||||
- **No process matching by pattern.** Never `pgrep -f`, `pkill -f`, `killall` (a `-f` wait loop matches itself). Wait in the foreground; stop only a recorded PID, or `TaskStop` the recorded task.
|
||||
- **Resume only from the session root.** Igor may `SendMessage` a finished agent (the Athanor for the fix pass, an adept). A subagent never resumes its own children; it dispatches fresh foreground agents.
|
||||
- **Pinned agents: omit `model`.** The per-call alias overrides the frontmatter pin. Override only on purpose, noted in the journal or run log.
|
||||
- **Unpinned agents: pass `model`.** Omitted, they inherit the caller's model, possibly Fable.
|
||||
- **Stamp the model id.** Every agent reads its exact id from its system prompt and writes it into its output.
|
||||
- **Leaf briefs say "do this yourself; do not dispatch further agents."** Only orchestrators (the Athanor) fan out. Gremlin briefs are exempt: the gremlins preamble says it and the launch removes the tools.
|
||||
- **Notifications report a turn ending, not a job finishing.** Read the result text before concluding. Check `ListAgents` before resuming.
|
||||
- **Output filenames.** Claude Code blocks subagent writes to `.md` files whose basename starts with `report`, `summary`, `findings` or `analysis`. Whoever names the path (the brief, or the agent when none is given) uses a role-prefixed name: `qa-report.md`, `research-findings.md`, `review-<scope>.md`. Spire's dated document names and `logs/` names (`run.md`, `review-`, `recheck-`, `brief-`) comply.
|
||||
- **Host layer.** Visible sessions, threads and delegates belong to the host file the README detection picks; the Athanor never uses them.
|
||||
|
||||
## Dispatch and notification
|
||||
|
||||
| Claim | Status |
|
||||
|---|---|
|
||||
| `Agent` calls default to background; `run_in_background: false` runs foreground and returns the result to the caller. | verified 2026-10-05 (Agent tool schema) |
|
||||
| Background **Agent-tool** children of a subagent notify the **session root**, not their parent; the parent sees nothing and stalls until the root feeds it the result. | observed 2026-09-24 and 2026-09-28 (spacecraft journals), re-observed 2026-10-21 (dirigent, installed 0.3.0 at 544b69c, version confirmed) and in the ai-developer HI-495/497 runs. Mechanism assumed. |
|
||||
| Background Bash started by a subagent notifies that subagent, not the root. | observed 2026-10-21 (5x), plus the dirigent V1 wake probe |
|
||||
| A turn-end can look like a hand-back while background work runs. The line `waiting on <job ids>; not a hand-back` (see `athanor.md`) means not done. | observed 2026-10-21 (A3, 6x) |
|
||||
| An agent that hands work to a background child and yields notifies `completed` at once, before any deliverable exists. Expect one more notification per background grandchild, each with its own `task-id`. | observed 2026-09-22 (Spire harness notes) |
|
||||
| One `task-id` may notify more than once (once per turn). Track the deliverable, not the count. | observed 2026-09-22 |
|
||||
| Background Agent-tool grandchildren appear in `ListAgents` as flat top-level agents of the session. One still writing your output path: do not resume its parent (second writer). Abandoning it: `TaskStop` the child first. | observed 2026-09-22 |
|
||||
| `TaskList` is the todo list, unrelated to agents. `TaskOutput` on an agent dumps its whole transcript into your context; never use it for agents. | observed 2026-09-22 |
|
||||
| A `general-purpose` agent has the Agent tool and delegates if its brief reads like an orchestration brief. | observed 2026-09-22 |
|
||||
| Once auto mode ends, a child's hand-back may wait on permission (`SubagentHandback` refused): idle, not hung. Before a long or overnight step: keep auto mode on, defer it with a journal note, or warn the user. | observed once 2026-10-21 (ai-developer bundle D); what the refusal blocks is unverified |
|
||||
| Desktop: `Agent` subagents show in the session's tasks pane, not the sidebar; output viewable and stoppable there. | verified 2026-11-12 (code.claude.com desktop docs, via dirigent Desktop report §2) |
|
||||
| `isolation: "worktree"` branches from the **default branch**, not the caller's HEAD; cleaned up when the child makes no changes. | verified 2026-11-12 (subagents docs, via dirigent Desktop report §2) |
|
||||
|
||||
## Limits
|
||||
|
||||
| Claim | Status |
|
||||
|---|---|
|
||||
| At most 20 subagents running per session (default). The 21st Agent-tool spawn fails with `Concurrent subagent limit reached`, and the error tells Claude not to retry; spawning works again once the running count drops. `CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS` (positive integer) changes the cap but cannot disable it. Not enforced under ultracode. Requires v2.1.217+. | verified 2026-11-24 (code.claude.com/docs/en/sub-agents#concurrent-subagent-limit, /docs/en/env-vars); observed twice (spacecraft Athanor fan-outs, 2026-11-16, version not recorded; error text then: "You can run 20 subagents at once... increase `CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS`") |
|
||||
| The cap counts the whole session, not one parent: Igor's other running children count too. A `/subtask` fork takes a slot. Resuming a finished subagent takes a slot without checking the cap, so resumes can push the count past it. Workflow agents and agent-team teammates have their own limits. No limit on total spawns per session (`CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION` is a no-op since v2.1.224). | verified 2026-11-24 (same pages) |
|
||||
| Gremlins are separate `claude -p` sessions, so they take no slot in the caller's session. | assumed from the docs' scope ("subagents running in a session"); not probed |
|
||||
| Nesting depth: 3 subagent layers below the main conversation by default (`CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH`; v2.1.217-218 defaulted to 1). Igor's session root → Athanor → child → grandchild is the deepest that works; the grandchild cannot spawn. | documented 2026-11-24 (env-vars page); a Desktop setup observed otherwise, see [`../../hosts/claude-desktop/spawning.md`](../../hosts/claude-desktop/spawning.md) |
|
||||
|
||||
## Resume
|
||||
|
||||
| Claim | Status |
|
||||
|---|---|
|
||||
| `SendMessage` to a finished agent's name or id resumes it, context intact. A new `Agent` call starts fresh. | verified 2026-10-05 (Agent tool schema) |
|
||||
| A resume from inside a subagent runs in the background; its completion goes to the root and the subagent stalls. From the root (Igor) it is safe: the notification lands there. | observed once 2026-10-05 (spacecraft journal: orchestrator resumed its implementer via SendMessage, went background, yielded). Mechanism assumed from the routing above. |
|
||||
|
||||
## Models
|
||||
|
||||
| Claim | Status |
|
||||
|---|---|
|
||||
| Per-call `model` accepts aliases only (`opus`, `sonnet`, `haiku`, `fable`) and overrides the agent definition's `model` frontmatter. | verified 2026-10-05 (Agent tool schema) |
|
||||
| `model` omitted: a pinned agent runs on its pin; an unpinned agent inherits the caller's model unless a default subagent model is configured. | verified 2026-10-05 (Agent tool schema) |
|
||||
| A full model id (e.g. `claude-opus-5-5`) is settable only in agent frontmatter; pinning by full id = a pinned agent dispatched without `model`. | verified 2026-10-05 (follows from the alias-only parameter) |
|
||||
| The `opus` alias overrode 4.6 pins in 184 of 184 spawns (they ran on 5.5). | observed 2026-09-27 (spacecraft MVP retrospective) |
|
||||
| A 4.6 Igor passing `model: "opus"` to the then 4.6-pinned Athanor got a 4.6 run (the dirigent end review that passed with zero findings). | observed 2026-10-05 (user's attribution; the dirigent report recorded the model as unknown). |
|
||||
| What the `opus` alias resolves to (caller's model, a session default, or newest Opus). | unknown. Check the stamped id of every plan, castigation and review instead. |
|
||||
| Every agent sees its exact model id in its system prompt. | observed 2026-10-05 for general-purpose agents (prompt shows `claude-opus-5-5`); not checked for plugin agents with their own bodies |
|
||||
| Context window of bare `claude-opus-5-5` pin vs `[1m]` suffix (other Spire pins carry `[1m]`). | resolved 2026-10-05: all Opus-pinned Spire agents (igor, adept, athanor, zathras, designer, planner, advocate, reviewer) pinned to `claude-opus-5-5[1m]` (user decision); the ~600k guesstimate in `models.md` assumes the larger window |
|
||||
|
||||
## Fork
|
||||
|
||||
Not used by Spire since 2026-10-16 (trunk + gremlins replaces it); rows kept as harness record.
|
||||
|
||||
| Claim | Status |
|
||||
|---|---|
|
||||
| The Agent tool schema documents `subagent_type: "fork"`: a fork always inherits the caller's model; `model` is ignored. | verified 2026-10-05 (schema text) |
|
||||
| `fork` is actually offered as an agent type in a given session. | unverified: the schema mentions it, but on 2026-10-05 it was not in the list of agent types offered to the reviewer |
|
||||
| A fork copies the **caller**, not an arbitrary agent; only the agent holding a context can fork it. | assumed (no parameter names a fork source) |
|
||||
| A fork starts with the caller's full transcript, at the caller's token count. | assumed, not measured |
|
||||
| Can a fork fork again? Does a foreground fork return its result to the caller? Does it see the caller's preloaded skills? | unknown; check in a throwaway preflight before relying on forks |
|
||||
|
||||
## Agent types
|
||||
|
||||
| Claim | Status |
|
||||
|---|---|
|
||||
| Plugin agent types (`athanor`, `adept`, `researcher`, …) can be missing in remote sessions, where `/reload-plugins` is unavailable. Fallback: `general-purpose` with an explicit `model` and the agent file's body pasted into the brief. | observed 2026-10-05 (reliquary Igor journal, 21:00) |
|
||||
| `Explore` and `Plan` are read-only (no Edit/Write); never use them for tasks that must write a file. | observed 2026-09-22 (Spire model tiers) |
|
||||
@@ -0,0 +1,38 @@
|
||||
# Codex runtime: spawning (partly verified)
|
||||
|
||||
Read only when dispatching into Codex (T3 `delegate_task` to Codex, Codex gremlins). Spire's own agents run on claude-code. Legend: [README](../../README.md). codex-cli 0.172.0.
|
||||
|
||||
| Claim | Status |
|
||||
|---|---|
|
||||
| `codex exec --json` runs non-interactively; first event is `thread.started{thread_id}`. No preassigned session id | verified 2026-11-24 (help, source, live runs) |
|
||||
| `codex exec fork <id> [PROMPT]` and `exec resume [id] [PROMPT]`; `exec`, `--ephemeral fork`, `resume` read the prompt from stdin `-`; concurrent forks ran. `--ignore-user-config` keeps auth | verified 2026-11-24 (help, source, P3 live, `gpt-6-luna`) |
|
||||
| `-s`, `-C`, `--add-dir`, `-p` are not global: for fork/resume they precede the subcommand (`codex exec -s read-only -C <dir> --json fork <id> "<prompt>"`) | verified 2026-11-24 (source) |
|
||||
| A fork takes model, effort, sandbox and cwd from the current call, not the base: repeat `-m`, `-c model_reasoning_effort=…`, `-s`, `-C` | verified 2026-11-24 (source) |
|
||||
| `exec` forces `approval_policy = never`, never prompts | verified 2026-11-24 (source, live runs) |
|
||||
| No trust entry: default sandbox read-only, project config, hooks, rules off. Outside a git repo `exec` exits without `--skip-git-repo-check` | observed 2026-11-24 (live runs) |
|
||||
| Tool shells inherit the full env; the `*KEY*/*SECRET*/*TOKEN*` filter is off (leak itself not seen) | verified 2026-11-24 (source) |
|
||||
| Multi-agent tools exist; `-c agents.enabled=false` disables them (accepted live) | verified 2026-11-24 (source, P3 live) |
|
||||
| `--ephemeral` forks wrote no rollout and read the base prefix from cache (2/2); persisted forks missed (0/3) | observed 2026-11-24 (research, P3; turn-delta estimate) |
|
||||
| A resumed base keeps its thread id and cache key | observed 2026-11-24 (research, P3) |
|
||||
| `turn.completed.usage` is the thread's running total, base included | observed 2026-11-24 (research) |
|
||||
| Nested `codex exec` works with `--add-dir <CODEX_HOME>` plus network on (n1 failed, n3 worked); escalation per helper call is untried (P4) | observed 2026-11-24 (n1/n3); escalation assumed |
|
||||
| Under `workspace-write` `.git` is read-only: a fork's `git commit` fails (`index.lock: Read-only file system`); forks never commit | verified 2026-11-24 (source); observed 2026-11-24 (P3) |
|
||||
| Native subagent tool is `spawn_agent`, then wait | assumed 2026-11-23 (T3 0.1.11 host rules, dirigent `reports/2026-11-23-11-t3-code-mcp-tools.md` §1, `reports/2026-11-23-11-harnesses.md`; not checked against Codex) |
|
||||
| `AGENTS.md` is the instruction file; skills via `.agents/skills`; Claude plugins do nothing | observed 2026-09-28 (dirigent `reports/2026-11-23-11-harnesses.md`, citing ai-developer reports) |
|
||||
| Spire ships a Codex manifest exposing `skills/`; whether Codex loads them and expands the plugin-root path variable | unknown |
|
||||
| Codex desktop, its sessions and worktrees | unknown |
|
||||
|
||||
## Consequence for Spire
|
||||
|
||||
A Codex child gets a self-contained brief: no `subagent_type`, no Spire skills relied on, no plugin-root path variable; paste what it needs. Keep secrets out of the brief: Codex does not scrub its tool shells, but the gremlins helper scrubs secret-shaped inherited env (`--pass-env` lets one through). Repeat model, effort, sandbox and cwd on every fork. Igor under Codex is unsupported in 0.4.0.
|
||||
|
||||
## Unknowns
|
||||
|
||||
- Manifest and skill loading; Codex desktop, worktrees.
|
||||
- `spawn_agent` arguments and wait semantics.
|
||||
- Which of `--add-dir <CODEX_HOME>` and network is needed for a nested `codex exec` is not isolated.
|
||||
- Rule syntax to deny `git push` or `codex` in a child; explicitly untrusted dirs.
|
||||
|
||||
## Sources
|
||||
|
||||
reliquary quire (unshipped): `research/2026-11-24-09-codex-gremlins-verification.md`. dirigent workpad (separate repo): `reports/2026-11-23-11-harnesses.md`, `reports/2026-11-23-11-t3-code-mcp-tools.md`.
|
||||
Reference in New Issue
Block a user