@agentprojectcontext/apx 1.34.0 → 1.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skills/apx/SKILL.md +1 -1
- package/src/core/agent/build-agent-system.js +134 -58
- package/src/core/agent/channels/voice-context.js +4 -4
- package/src/core/agent/prompt-builder.js +176 -123
- package/src/core/agent/prompts/channels/code.md +12 -10
- package/src/core/agent/prompts/channels/desktop.md +5 -32
- package/src/core/agent/prompts/channels/telegram.md +4 -15
- package/src/core/agent/prompts/channels/web_code.md +11 -11
- package/src/core/agent/prompts/core/agent-base.md +24 -0
- package/src/core/agent/prompts/core/project-agent.md +11 -0
- package/src/core/agent/prompts/core/super-agent.md +21 -0
- package/src/core/agent/prompts/discipline/action.md +10 -0
- package/src/core/agent/prompts/discipline/single-segment.md +6 -0
- package/src/core/agent/prompts/discipline/two-segment.md +11 -0
- package/src/core/agent/self-memory.js +43 -1
- package/src/core/agent/skills/index-store.js +307 -0
- package/src/core/agent/skills/index.js +15 -1
- package/src/core/agent/skills/inspector.js +317 -0
- package/src/core/agent/super-agent.js +7 -1
- package/src/core/agent/tools/handlers/_git.js +50 -0
- package/src/core/agent/tools/handlers/git-diff.js +44 -0
- package/src/core/agent/tools/handlers/git-log.js +38 -0
- package/src/core/agent/tools/handlers/git-show.js +34 -0
- package/src/core/agent/tools/handlers/git-status.js +61 -0
- package/src/core/agent/tools/names.js +31 -0
- package/src/core/agent/tools/registry.js +36 -5
- package/src/core/config/index.js +21 -0
- package/src/core/runtime-skills/apx/SKILL.md +27 -39
- package/src/core/runtime-skills/apx-agency-agents/SKILL.md +40 -56
- package/src/core/runtime-skills/apx-agent/SKILL.md +27 -30
- package/src/core/runtime-skills/apx-mcp/SKILL.md +31 -36
- package/src/core/runtime-skills/apx-mcp-builder/SKILL.md +37 -51
- package/src/core/runtime-skills/apx-project/SKILL.md +20 -29
- package/src/core/runtime-skills/apx-routine/SKILL.md +34 -47
- package/src/core/runtime-skills/apx-runtime/SKILL.md +32 -50
- package/src/core/runtime-skills/apx-sessions/SKILL.md +96 -145
- package/src/core/runtime-skills/apx-skill-builder/SKILL.md +53 -77
- package/src/core/runtime-skills/apx-task/SKILL.md +18 -21
- package/src/core/runtime-skills/apx-telegram/SKILL.md +43 -54
- package/src/core/runtime-skills/apx-voice/SKILL.md +36 -56
- package/src/host/daemon/api/skills.js +140 -6
- package/src/host/daemon/api/super-agent.js +56 -1
- package/src/host/daemon/index.js +17 -0
- package/src/interfaces/cli/branding.js +53 -0
- package/src/interfaces/cli/commands/skills.js +254 -0
- package/src/interfaces/cli/index.js +84 -2
- package/src/interfaces/web/dist/assets/index-C0fm31dY.js +618 -0
- package/src/interfaces/web/dist/assets/index-C0fm31dY.js.map +1 -0
- package/src/interfaces/web/dist/assets/index-UcAqlBO6.css +1 -0
- package/src/interfaces/web/dist/index.html +2 -2
- package/src/interfaces/web/src/components/chat/MessageBubble.tsx +21 -1
- package/src/interfaces/web/src/components/settings/MemoryPanel.tsx +68 -0
- package/src/interfaces/web/src/components/settings/SkillsInspectorPanel.tsx +222 -0
- package/src/interfaces/web/src/hooks/useChat.ts +19 -0
- package/src/interfaces/web/src/i18n/en.ts +1 -0
- package/src/interfaces/web/src/i18n/es.ts +1 -0
- package/src/interfaces/web/src/lib/api/skills.ts +70 -0
- package/src/interfaces/web/src/screens/SettingsScreen.tsx +6 -2
- package/src/interfaces/web/src/types/daemon.ts +10 -0
- package/src/core/agent/prompts/action-discipline.md +0 -24
- package/src/core/agent/prompts/super-agent-base.md +0 -42
- package/src/interfaces/web/dist/assets/index-DdmSRtsz.css +0 -1
- package/src/interfaces/web/dist/assets/index-M4FspaCH.js +0 -613
- package/src/interfaces/web/dist/assets/index-M4FspaCH.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: apx-runtime
|
|
3
|
-
description: Delegate a task to an external coding CLI (claude-code, codex, opencode, aider, cursor-agent, gemini-cli, qwen-code) via `apx run`. APX builds the system prompt, spawns the CLI,
|
|
3
|
+
description: Delegate a task to an external coding CLI (claude-code, codex, opencode, aider, cursor-agent, gemini-cli, qwen-code) via `apx run`. APX builds the system prompt, spawns the CLI, captures the result. Load when delegating to another AI tool.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# apx-runtime
|
|
7
7
|
|
|
8
|
-
A "runtime"
|
|
8
|
+
A "runtime" is an external AI coding CLI that APX invokes headlessly. APX builds the agent's system prompt, spawns the CLI with the right flags, captures stdout (and the external session id when available), and stores run metadata as a session file under `~/.apx/projects/<apxId>/agents/<slug>/sessions/` (never committed). Some flows link to the engine's own transcript path.
|
|
9
9
|
|
|
10
10
|
## Supported runtimes
|
|
11
11
|
|
|
@@ -17,35 +17,33 @@ A "runtime" in APX is an external AI coding CLI that APX can invoke headlessly.
|
|
|
17
17
|
| `aider` | `aider` | `--message "<prompt>" --no-stream` |
|
|
18
18
|
| `cursor-agent` | `cursor-agent` | headless print mode |
|
|
19
19
|
| `gemini-cli` | `gemini` | headless prompt mode |
|
|
20
|
-
| `qwen-code` | `qwen-code` |
|
|
20
|
+
| `qwen-code` | `qwen-code` | system prompt passed separately |
|
|
21
21
|
|
|
22
22
|
`apx env detect` reports which are installed and reachable.
|
|
23
23
|
|
|
24
24
|
## Concrete CLI calls
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
#
|
|
28
|
-
apx env
|
|
29
|
-
apx env list # alias of `apx env detect`
|
|
27
|
+
apx env detect # which runtimes are installed
|
|
28
|
+
apx env list # alias
|
|
30
29
|
|
|
31
|
-
# Run an agent through an external CLI
|
|
32
30
|
apx run reviewer --runtime claude-code "Review the diff in src/host/daemon/api/ for memory leaks"
|
|
33
31
|
apx run scratch --runtime codex "Refactor parseAgentsMd to use a state machine"
|
|
34
32
|
apx run scratch --runtime opencode "<prompt>"
|
|
35
|
-
apx run scratch --runtime codex --timeout 300 "<prompt>" # cap
|
|
36
|
-
apx run scratch --runtime codex - #
|
|
33
|
+
apx run scratch --runtime codex --timeout 300 "<prompt>" # cap (seconds)
|
|
34
|
+
apx run scratch --runtime codex - # prompt from stdin (large prompts)
|
|
37
35
|
```
|
|
38
36
|
|
|
39
37
|
Behavior:
|
|
40
|
-
1. APX picks
|
|
41
|
-
2. Reads
|
|
42
|
-
3. Spawns
|
|
43
|
-
4. Captures stdout. If
|
|
44
|
-
5. Writes `~/.apx/projects/<apxId>/agents/<slug>/sessions/<YYYY-MM-DD>-<id>.md` with frontmatter linking back to the external
|
|
38
|
+
1. APX picks project from `--project` or cwd.
|
|
39
|
+
2. Reads agent's `AGENT.md` + memory + skills; builds system prompt with `buildAgentSystem({ invocation: "runtime", runtime: "<id>" })`.
|
|
40
|
+
3. Spawns CLI with the right flags; cwd = project path.
|
|
41
|
+
4. Captures stdout. If runtime printed `APC_RESULT: <value>`, that's the structured result; else first 200 chars of stdout.
|
|
42
|
+
5. Writes `~/.apx/projects/<apxId>/agents/<slug>/sessions/<YYYY-MM-DD>-<id>.md` with frontmatter linking back to the external transcript when available.
|
|
45
43
|
|
|
46
44
|
## Resuming an external session
|
|
47
45
|
|
|
48
|
-
|
|
46
|
+
The session file references the external transcript:
|
|
49
47
|
|
|
50
48
|
```yaml
|
|
51
49
|
# ~/.apx/projects/<apxId>/agents/reviewer/sessions/2026-05-27-claude-code-abc123.md
|
|
@@ -56,62 +54,46 @@ session_id: abc123
|
|
|
56
54
|
---
|
|
57
55
|
```
|
|
58
56
|
|
|
59
|
-
|
|
60
|
-
**`apx-sessions`** skill. From here, the most common quick paths:
|
|
57
|
+
Full resume/get/continue/summarise lives in the **`apx-sessions`** skill. Quick paths:
|
|
61
58
|
|
|
62
59
|
```bash
|
|
63
|
-
# Discover the id (or use the one printed by `apx run`)
|
|
64
60
|
apx sessions list --engine claude --project iacrmar
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
apx session resume <id>
|
|
68
|
-
apx session resume <id> --
|
|
69
|
-
apx session
|
|
70
|
-
apx session resume <id> --into apx:<slug> # seed a new APX session with the summary
|
|
71
|
-
|
|
72
|
-
# Just read the transcript
|
|
73
|
-
apx session get <id> --any --full # or --engine claude --tail 16k
|
|
61
|
+
apx session resume <id> # auto-detects engine
|
|
62
|
+
apx session resume <id> --continue # spawn native CLI to keep going
|
|
63
|
+
apx session resume <id> --summary # super-agent summary
|
|
64
|
+
apx session resume <id> --into apx:<slug> # seed new APX session
|
|
65
|
+
apx session get <id> --any --full # or --engine claude --tail 16k
|
|
74
66
|
```
|
|
75
67
|
|
|
76
|
-
See
|
|
77
|
-
and daemon-vs-no-daemon matrix.
|
|
68
|
+
See `apx-sessions` for full flag reference, collision handling, and daemon-vs-no-daemon matrix.
|
|
78
69
|
|
|
79
70
|
## APC_RESULT contract
|
|
80
71
|
|
|
81
|
-
|
|
72
|
+
To capture a structured value from the external runtime, instruct it via the prompt to print on its last line:
|
|
82
73
|
|
|
83
74
|
```
|
|
84
75
|
APC_RESULT: <one-line value>
|
|
85
76
|
```
|
|
86
77
|
|
|
87
|
-
|
|
78
|
+
`extractApfResult()` parses that into the session's `result` field. Useful for automation return values.
|
|
88
79
|
|
|
89
80
|
## Anti-examples
|
|
90
81
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
# DON'T pass huge prompts via the command line (shell args have limits).
|
|
96
|
-
# For prompts > ~10KB, use a stdin-friendly route or write a temp file and reference it.
|
|
97
|
-
|
|
98
|
-
# DON'T forget that each runtime has its own model selection.
|
|
99
|
-
# APX passes the system prompt and the user prompt; it does NOT impose a model on
|
|
100
|
-
# the external CLI. The user's external CLI config (e.g. Claude Code's CLAUDE.md
|
|
101
|
-
# defaults) wins.
|
|
102
|
-
```
|
|
82
|
+
- DON'T expect `apx run` to be interactive — it's headless. For interactive, invoke the CLI directly (e.g. `claude`).
|
|
83
|
+
- DON'T pass huge prompts via command line (shell arg limits). For >~10KB, use stdin (`-`) or a temp file.
|
|
84
|
+
- DON'T expect APX to impose a model on the external CLI. APX passes system + user prompt only; the external CLI's own config wins.
|
|
103
85
|
|
|
104
86
|
## When to use which
|
|
105
87
|
|
|
106
88
|
| You want | Pick |
|
|
107
89
|
|---|---|
|
|
108
|
-
| Pair-program with file edits
|
|
109
|
-
| Lightweight LLM run
|
|
110
|
-
|
|
|
111
|
-
|
|
|
90
|
+
| Pair-program with file edits + shell | `claude-code` if installed, else `codex` |
|
|
91
|
+
| Lightweight LLM run, no tools | `apx exec <agent> "<prompt>"` (no runtime needed) |
|
|
92
|
+
| Super-agent to call other agents | `call_agent` tool (in-process, no spawn) |
|
|
93
|
+
| Persisted state across days | `apx run` with `claude-code` or `codex` (their sessions persist) |
|
|
112
94
|
|
|
113
95
|
## Don't
|
|
114
96
|
|
|
115
|
-
-
|
|
116
|
-
-
|
|
117
|
-
-
|
|
97
|
+
- Run untrusted prompts in a `--runtime` CLI with broad tool permissions — the CLI may take file/shell actions.
|
|
98
|
+
- Expect APX to track tool calls inside the external transcript. APX captures stdout + external session path only; inspect the external transcript for tool-level audit.
|
|
99
|
+
- Pick a runtime the user doesn't have installed; `apx env detect` first.
|
|
@@ -1,281 +1,232 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: apx-sessions
|
|
3
|
-
description: "
|
|
3
|
+
description: "Cross-engine session ops (apx, claude, codex, antigravity): find by title, list, get transcript, summarize, ask, resume, continue. Triggers: 'apx session find/ask/summary/resume/get', 'find/resume/summarize session', 'get session transcript', 'continue session in apx'. Not for `apx run` orchestration (use apx skill)."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# APX Sessions — cross-engine resume, summary,
|
|
6
|
+
# APX Sessions — cross-engine resume, summary, continuation
|
|
7
7
|
|
|
8
|
-
APX treats every supported engine
|
|
8
|
+
APX treats every supported engine as a session store. These commands list, read, summarize, and continue sessions **without caring which engine owns them**.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Storage locations APX scans:
|
|
11
11
|
|
|
12
|
-
| Engine | Where
|
|
12
|
+
| Engine | Where |
|
|
13
13
|
|-----------|-----------------------------------------------------------|
|
|
14
14
|
| apx | `~/.apx/projects/<apx_id>/agents/<slug>/sessions/*.md` |
|
|
15
15
|
| claude | `~/.claude/projects/<encoded-cwd>/<id>.jsonl` |
|
|
16
16
|
| codex | `~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl` |
|
|
17
17
|
| antigravity | detected only — listing not implemented yet |
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Uninstalled engines are skipped silently. Detected-but-empty engines print `(sin nada)`.
|
|
20
20
|
|
|
21
21
|
---
|
|
22
22
|
|
|
23
|
-
##
|
|
23
|
+
## Discovery flow (read first)
|
|
24
24
|
|
|
25
|
-
You
|
|
25
|
+
You start with a vague title, not an id. Do **not** `apx sessions list | grep`. The flow:
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
|
-
# 1.
|
|
28
|
+
# 1. Title → id (cross-engine, newest first)
|
|
29
29
|
apx session find "improve web UI"
|
|
30
30
|
|
|
31
|
-
# 2.
|
|
31
|
+
# 2. Gist
|
|
32
32
|
apx session summary <id>
|
|
33
33
|
|
|
34
|
-
# 3.
|
|
34
|
+
# 3. Specifics
|
|
35
35
|
apx session ask <id> "what sidebar changes were left pending?"
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
`find` prints a "Next:" block with
|
|
38
|
+
`find` prints a "Next:" block with `summary`/`ask`/`resume` pre-filled with the top hit's id. **If tempted to grep session lists, use `find` instead.**
|
|
39
39
|
|
|
40
40
|
---
|
|
41
41
|
|
|
42
|
-
## Finding
|
|
42
|
+
## Finding sessions (`apx session find`)
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
|
-
apx session find "<text>" #
|
|
46
|
-
apx session find "<text>" --deep # also
|
|
45
|
+
apx session find "<text>" # titles across every engine
|
|
46
|
+
apx session find "<text>" --deep # also greps transcript content
|
|
47
47
|
apx session find "<text>" --engine codex # restrict to one engine
|
|
48
|
-
apx session find "<text>" --dir /path/to/repo # scope
|
|
49
|
-
apx session find "<text>" --limit 10 --json
|
|
48
|
+
apx session find "<text>" --dir /path/to/repo # scope (reaches unregistered Claude projects)
|
|
49
|
+
apx session find "<text>" --limit 10 --json
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
- `--deep` reads each candidate transcript off disk and greps its content too. Slower; prefer combining it with `--engine`/`--dir` scope.
|
|
54
|
-
- Output is one row per match — `DATE | ENGINE | SESSION ID | TITLE` — newest first, followed by ready-to-run `summary`/`ask`/`resume` commands.
|
|
52
|
+
Default is title-only (fast, indexed). `--deep` reads each candidate transcript off disk; combine with `--engine`/`--dir` to scope. Output rows: `DATE | ENGINE | SESSION ID | TITLE`, newest first, plus ready-to-run `summary`/`ask`/`resume` commands.
|
|
55
53
|
|
|
56
|
-
**Coverage caveat:** an engine
|
|
54
|
+
**Coverage caveat:** an engine is enumerated only when APX can resolve a project cwd. Codex always records it; APX uses registered projects; **Claude only lists folders mapping to a registered APX project** (encoded folder names are lossy). If a Claude session is missing, scope with `--dir <path>`.
|
|
57
55
|
|
|
58
56
|
---
|
|
59
57
|
|
|
60
|
-
##
|
|
58
|
+
## Summarize / Ask
|
|
61
59
|
|
|
62
60
|
```bash
|
|
63
|
-
apx session summary <id> # auto-detect
|
|
64
|
-
apx session summary <id> --engine claude
|
|
61
|
+
apx session summary <id> # auto-detect, LLM summary
|
|
62
|
+
apx session summary <id> --engine claude
|
|
65
63
|
apx session summary <id> --max-chunks 8 # bound cost on a huge transcript
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
This is the discoverable alias for `apx session resume <id> --summary`. It resolves the owning engine, then prints a 4-bullet summary plus next steps. **Requires the daemon + `super_agent.enabled`.**
|
|
69
|
-
|
|
70
|
-
---
|
|
71
64
|
|
|
72
|
-
## Asking questions about a session (`apx session ask`)
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
65
|
apx session ask <id> "what did we decide about the sidebar?"
|
|
76
66
|
apx session ask <id> "what files were changed?" --max-chunks 30
|
|
77
67
|
```
|
|
78
68
|
|
|
79
|
-
RAG-lite Q&A
|
|
80
|
-
|
|
81
|
-
How it works and its limits:
|
|
69
|
+
`summary` is the alias for `apx session resume <id> --summary`: resolves engine, prints a 4-bullet summary plus next steps. `ask` is RAG-lite Q&A: small transcripts answer in one shot; large ones are **map-reduced** (each ~48 KB part mined for relevant notes, final pass synthesizes). Both **require the daemon + `super_agent.enabled`**.
|
|
82
70
|
|
|
83
|
-
|
|
84
|
-
- Coverage is capped at `--max-chunks` (default 20 ≈ ~960 KB). Bigger transcripts print a truncation warning — raise `--max-chunks` for full coverage at the cost of more (sequential) model calls.
|
|
85
|
-
- Speed scales with transcript size: a typical session answers in seconds; a multi-MB Codex rollout can take a couple of minutes.
|
|
86
|
-
- Output quality depends on the configured `super_agent.model`. Small/cheap models that "think" (e.g. gemini-2.5-flash) can return thin answers; the command already requests a raised output budget to compensate.
|
|
71
|
+
Limits of `ask`: binary noise (base64 images) is stripped before chunking. Coverage capped at `--max-chunks` (default 20 ≈ 960 KB) — bigger transcripts print a truncation warning; raise `--max-chunks` for full coverage at the cost of more sequential model calls. Speed scales with size (seconds to a couple of minutes). Quality depends on `super_agent.model` — cheap thinking models (e.g. gemini-2.5-flash) can return thin answers.
|
|
87
72
|
|
|
88
73
|
---
|
|
89
74
|
|
|
90
75
|
## Listing sessions
|
|
91
76
|
|
|
92
77
|
```bash
|
|
93
|
-
#
|
|
94
|
-
apx sessions list
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
apx sessions list --dir /path
|
|
98
|
-
apx sessions list --project iacrmar # uses a registered APX project's path
|
|
99
|
-
|
|
100
|
-
# One engine, all projects
|
|
101
|
-
apx sessions list --engine claude
|
|
102
|
-
apx sessions list --engine codex
|
|
103
|
-
|
|
104
|
-
# One engine, one project
|
|
105
|
-
apx sessions list --engine claude --project iacrmar
|
|
106
|
-
apx sessions list --engine codex --dir /path/to/repo --limit 10
|
|
78
|
+
apx sessions list # all engines, all projects
|
|
79
|
+
apx sessions list --dir /path/to/repo # all engines, one dir (no registration needed)
|
|
80
|
+
apx sessions list --project iacrmar # all engines, registered project
|
|
81
|
+
apx sessions list --engine claude # one engine, all projects
|
|
82
|
+
apx sessions list --engine codex --dir /path --limit 10 # one engine, one dir
|
|
107
83
|
```
|
|
108
84
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
When no `--engine` is passed, output is grouped by engine with `══ <Engine> ══` headers. Empty engines print `(sin nada)`; un-installed engines are not listed at all.
|
|
85
|
+
Per engine: `DATE | SESSION ID | TITLE` newest first, plus the native-CLI resume command at the bottom. Without `--engine`, output is grouped with `══ <Engine> ══` headers. Empty engines print `(sin nada)`; uninstalled engines are omitted.
|
|
112
86
|
|
|
113
87
|
---
|
|
114
88
|
|
|
115
|
-
## Resuming
|
|
89
|
+
## Resuming by id (`apx session resume <id>`)
|
|
116
90
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
What it does, in order:
|
|
91
|
+
1. Searches every engine (apx → claude → codex).
|
|
92
|
+
2. **One match** → prints metadata (engine, path, cwd, title).
|
|
93
|
+
3. **Zero matches** → non-zero exit with `session "<id>" not found in any detected engine`.
|
|
94
|
+
4. **Multiple matches** → prints all, exit 2, asks for `--engine <id>`.
|
|
122
95
|
|
|
123
|
-
|
|
124
|
-
2. **One match** → prints metadata: engine, file path, cwd, title.
|
|
125
|
-
3. **Zero matches** → exits non-zero with `session "<id>" not found in any detected engine`.
|
|
126
|
-
4. **Multiple matches (collision)** → prints all of them and exits with code 2, telling you to re-run with `--engine <id>`.
|
|
127
|
-
|
|
128
|
-
Then it applies any of the following flags:
|
|
96
|
+
Flags:
|
|
129
97
|
|
|
130
98
|
| Flag | Effect |
|
|
131
99
|
|------|--------|
|
|
132
|
-
| `--engine <apx\|claude\|codex>` |
|
|
133
|
-
| `--tail N[k\|m]` | Print last N bytes
|
|
134
|
-
| `--full` / `--body` | Dump
|
|
135
|
-
| `--summary` |
|
|
136
|
-
| `--continue` | Spawn
|
|
137
|
-
| `--into apx[:slug]` | Create a
|
|
138
|
-
| `--project <name\|id\|path>` |
|
|
100
|
+
| `--engine <apx\|claude\|codex>` | Skip auto-detection. |
|
|
101
|
+
| `--tail N[k\|m]` | Print last N bytes (e.g. `--tail 32k`). No daemon. |
|
|
102
|
+
| `--full` / `--body` | Dump entire transcript. No daemon. |
|
|
103
|
+
| `--summary` | Tail → super-agent → 4-bullet summary. **Daemon + `super_agent.enabled`.** |
|
|
104
|
+
| `--continue` | Spawn engine's native CLI in resume mode (`claude --resume <id>`, `codex resume <id>`) in recorded cwd. |
|
|
105
|
+
| `--into apx[:slug]` | Create a new APX session whose body is the summary of `<id>`. Frontmatter records `parent_session: <engine>:<id>`. Default slug = original APX agent if any, else first agent in `AGENTS.md`. |
|
|
106
|
+
| `--project <name\|id\|path>` | Only for `--summary` on apx-native sessions. |
|
|
139
107
|
|
|
140
|
-
###
|
|
108
|
+
### Recipes
|
|
141
109
|
|
|
142
110
|
```bash
|
|
143
|
-
#
|
|
111
|
+
# Codex id → summary in apx
|
|
144
112
|
apx session resume 019abc... --summary
|
|
145
113
|
|
|
146
|
-
#
|
|
114
|
+
# Continue a Codex thread inside APX with the reviewer agent
|
|
147
115
|
apx session resume 019abc... --summary --into apx:reviewer
|
|
148
116
|
|
|
149
|
-
#
|
|
117
|
+
# Dump full transcript and grep
|
|
150
118
|
apx session resume 019abc... --full | rg "TODO"
|
|
151
119
|
|
|
152
|
-
#
|
|
120
|
+
# Re-open in native CLI
|
|
153
121
|
apx session resume 019abc... --continue
|
|
154
122
|
|
|
155
|
-
#
|
|
123
|
+
# Known Claude session, skip auto-detect
|
|
156
124
|
apx session resume 2e3c840b-... --engine claude --tail 16k
|
|
157
125
|
```
|
|
158
126
|
|
|
159
127
|
---
|
|
160
128
|
|
|
161
|
-
## Reading
|
|
162
|
-
|
|
163
|
-
`apx session get` is the "fetch and read" command. It has two modes:
|
|
164
|
-
|
|
165
|
-
### Default mode — local APC project sessions
|
|
129
|
+
## Reading content (`apx session get`)
|
|
166
130
|
|
|
167
131
|
```bash
|
|
168
|
-
|
|
132
|
+
# Default: local APC project sessions
|
|
133
|
+
apx session get <id> # metadata
|
|
169
134
|
apx session get <id> --body # full markdown body
|
|
170
135
|
apx session get <id> --json # machine-readable metadata
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
### Engine mode — read any engine's session by id
|
|
174
136
|
|
|
175
|
-
|
|
176
|
-
apx session get <id> --engine claude --full
|
|
177
|
-
apx session get <id> --engine codex --tail 16k
|
|
178
|
-
apx session get <id> --any --full
|
|
179
|
-
apx session get <id> --engine claude --json
|
|
137
|
+
# Engine mode: any engine by id
|
|
138
|
+
apx session get <id> --engine claude --full
|
|
139
|
+
apx session get <id> --engine codex --tail 16k
|
|
140
|
+
apx session get <id> --any --full # search all engines, error on collision
|
|
141
|
+
apx session get <id> --engine claude --json
|
|
180
142
|
```
|
|
181
143
|
|
|
182
|
-
**
|
|
144
|
+
**Use this to pull a Codex/Claude session into your current context.** Pipe `--full` into a file or prompt:
|
|
183
145
|
|
|
184
146
|
```bash
|
|
185
|
-
# Pull a Codex session into context for the current Claude session
|
|
186
147
|
apx session get 019abc... --engine codex --full > /tmp/prev.jsonl
|
|
187
148
|
```
|
|
188
149
|
|
|
189
150
|
---
|
|
190
151
|
|
|
191
|
-
## Daemon
|
|
152
|
+
## Daemon requirements
|
|
192
153
|
|
|
193
|
-
| Capability | Daemon
|
|
194
|
-
|
|
195
|
-
| `
|
|
196
|
-
| `
|
|
197
|
-
| `apx
|
|
198
|
-
| `apx session resume <id>` (metadata only) | ❌ no |
|
|
199
|
-
| `apx session resume <id> --tail / --full` | ❌ no |
|
|
200
|
-
| `apx session resume <id> --continue` | ❌ no |
|
|
201
|
-
| `apx session resume <id> --summary` / `apx session summary <id>` | ✅ yes (daemon + `super_agent.enabled` in `~/.apx/config.json`) |
|
|
202
|
-
| `apx session ask <id> "<q>"` | ✅ yes (daemon + `super_agent.enabled`) |
|
|
203
|
-
| `apx session resume <id> --into apx[:slug]` | ⚠️ daemon needed only to compute the summary it embeds; without it, the new session is created with an empty summary block |
|
|
154
|
+
| Capability | Daemon? |
|
|
155
|
+
|------------|---------|
|
|
156
|
+
| `find`, `list`, `get`, `resume <id>` (metadata/tail/full/continue) | no |
|
|
157
|
+
| `resume --summary`, `summary`, `ask` | yes (daemon + `super_agent.enabled` in `~/.apx/config.json`) |
|
|
158
|
+
| `resume --into apx[:slug]` | daemon needed only to compute embedded summary; without it the new session has an empty summary block |
|
|
204
159
|
|
|
205
160
|
If the daemon is down, `apx` auto-starts it when needed.
|
|
206
161
|
|
|
207
162
|
---
|
|
208
163
|
|
|
209
|
-
## Native APX session commands (legacy
|
|
164
|
+
## Native APX session commands (legacy, still useful)
|
|
210
165
|
|
|
211
|
-
|
|
166
|
+
Manage APX-native sessions (`.md` files in `~/.apx/projects/.../sessions/`). They do **not** see Claude/Codex sessions.
|
|
212
167
|
|
|
213
168
|
```bash
|
|
214
169
|
apx session new <slug> --title "Investigate bug X"
|
|
215
|
-
apx session list # all agents in
|
|
216
|
-
apx session list <slug>
|
|
170
|
+
apx session list # all agents in current APC project
|
|
171
|
+
apx session list <slug>
|
|
217
172
|
apx session update <id> --status "in progress"
|
|
218
173
|
apx session close <id> --result "Fixed in PR #42"
|
|
219
|
-
apx session check # exit 1 if any APX session is
|
|
220
|
-
apx session close-stale # auto-close
|
|
221
|
-
apx session compact <slug> # summarize a conversation
|
|
174
|
+
apx session check # exit 1 if any APX session is open
|
|
175
|
+
apx session close-stale # auto-close >1h old
|
|
176
|
+
apx session compact <slug> # summarize a conversation to disk
|
|
222
177
|
```
|
|
223
178
|
|
|
224
|
-
These live next to the new cross-engine commands above; they don't replace each other.
|
|
225
|
-
|
|
226
179
|
---
|
|
227
180
|
|
|
228
181
|
## Disambiguating collisions
|
|
229
182
|
|
|
230
|
-
If two engines happen to use the same id string for different sessions:
|
|
231
|
-
|
|
232
183
|
```
|
|
233
184
|
$ apx session resume abc123
|
|
234
185
|
⚠️ session id "abc123" exists in multiple engines:
|
|
235
186
|
- claude /Users/.../-Volumes-work-repo/abc123.jsonl (cwd: /Volumes/work/repo)
|
|
236
|
-
- codex /Users/.../sessions/2026/05/27/rollout
|
|
187
|
+
- codex /Users/.../sessions/2026/05/27/rollout-...-abc123.jsonl (cwd: /Volumes/work/repo)
|
|
237
188
|
→ re-run with --engine <id> to pick one (apx | claude | codex)
|
|
238
189
|
```
|
|
239
190
|
|
|
240
|
-
Pick one with `--engine claude` or `--engine codex
|
|
191
|
+
Pick one with `--engine claude` or `--engine codex`.
|
|
241
192
|
|
|
242
193
|
---
|
|
243
194
|
|
|
244
195
|
## Tips for callers (LLMs)
|
|
245
196
|
|
|
246
|
-
1. **Start with `find`, not grep.**
|
|
247
|
-
2. **Don't ask the user which engine.** Auto-detect handles it
|
|
248
|
-
3. **`summary` for the gist, `ask` for specifics.**
|
|
249
|
-
4. **`ask` on
|
|
250
|
-
5. **Prefer `--tail N` over `--full`** when feeding
|
|
251
|
-
6. **`--into apx:slug
|
|
252
|
-
7. **Don't invent ids.** Discover them via `
|
|
253
|
-
8. **`apx session get --any --full`** is the simplest
|
|
197
|
+
1. **Start with `find`, not grep.** Never reconstruct via `apx sessions list | grep`.
|
|
198
|
+
2. **Don't ask the user which engine.** Auto-detect handles it; re-run with `--engine` only on collision.
|
|
199
|
+
3. **`summary` for the gist, `ask` for specifics.** Both need daemon + `super_agent.enabled`.
|
|
200
|
+
4. **`ask` on huge transcripts is slow and capped.** Raise `--max-chunks` if truncation warns and full coverage matters.
|
|
201
|
+
5. **Prefer `--tail N` over `--full`** when feeding raw transcripts to another model — JSONL is verbose, the tail is dense.
|
|
202
|
+
6. **`--into apx:slug`** is the bridge for "let's continue this in apx with the reviewer agent".
|
|
203
|
+
7. **Don't invent ids.** Discover them via `find` or `sessions list`.
|
|
204
|
+
8. **`apx session get --any --full`** is the simplest no-daemon import of any engine session.
|
|
254
205
|
|
|
255
206
|
---
|
|
256
207
|
|
|
257
|
-
## Quick reference
|
|
208
|
+
## Quick reference
|
|
258
209
|
|
|
259
210
|
```bash
|
|
260
211
|
# Discovery
|
|
261
|
-
apx session find "<text>" #
|
|
262
|
-
apx session find "<text>" --deep
|
|
263
|
-
apx sessions list
|
|
264
|
-
apx sessions list --project <name>
|
|
265
|
-
apx sessions list --engine <id> --dir <path>
|
|
212
|
+
apx session find "<text>" # start here
|
|
213
|
+
apx session find "<text>" --deep
|
|
214
|
+
apx sessions list
|
|
215
|
+
apx sessions list --project <name>
|
|
216
|
+
apx sessions list --engine <id> --dir <path>
|
|
266
217
|
|
|
267
218
|
# Understand
|
|
268
|
-
apx session summary <id>
|
|
269
|
-
apx session ask <id> "<question>"
|
|
219
|
+
apx session summary <id>
|
|
220
|
+
apx session ask <id> "<question>"
|
|
270
221
|
|
|
271
222
|
# Read
|
|
272
|
-
apx session get <id> # local APC
|
|
273
|
-
apx session get <id> --engine <id> --full
|
|
274
|
-
apx session get <id> --any --tail 32k
|
|
223
|
+
apx session get <id> # local APC metadata
|
|
224
|
+
apx session get <id> --engine <id> --full
|
|
225
|
+
apx session get <id> --any --tail 32k
|
|
275
226
|
|
|
276
227
|
# Resume / continue
|
|
277
|
-
apx session resume <id>
|
|
278
|
-
apx session resume <id> --summary
|
|
279
|
-
apx session resume <id> --continue
|
|
280
|
-
apx session resume <id> --into apx:<slug>
|
|
228
|
+
apx session resume <id>
|
|
229
|
+
apx session resume <id> --summary
|
|
230
|
+
apx session resume <id> --continue
|
|
231
|
+
apx session resume <id> --into apx:<slug>
|
|
281
232
|
```
|