Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions AGENTS.md

Large diffs are not rendered by default.

73 changes: 33 additions & 40 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,39 +72,21 @@

## Backlog

- 2026-11-14 (evening), diagnosed, not fixed: a replayed thread blocked by a `UserPromptSubmit` hook
ends as a `no reply` turn and the history is lost. Two turns of session
`ses_e324dbf7bffeRHQIz10AIxm7dT` (after a switch from appical Opus 5.5 to default Fable 5.2, and
again after an opencode restart) logged `replaying the conversation as text ... reason:
sibling-conversation-changed` (20:42:45Z, 20:48:39Z; envelopes of 187,540 and 196,636 characters),
then `claude finished the turn without a reply` about 9 s later. Claude Code 2.1.322's transcript
(`~/.claude/projects/-Users-khalil-code-Private-opencode-claude-code-plugin/8ded207b-3255-4627-8a30-70cf0eb0773d.jsonl`,
first 12 records) shows why: the prompt was dequeued and never became a `user` record; the CLI wrote
`system`/`informational` "UserPromptSubmit operation blocked by hook: agent-guard: blocked user
prompt: it contains secret-like values" (`promptSubmitEnding.ending.kind: "blocked_by_hook"`,
`promptKept: false`, `preventContinuation: true`, `AGENT_GUARD_PROMPT_GUARD_MODE` controls it), made
no API call and ended the turn. The plugin wrote the `no reply` note ("Nothing failed and nothing is
pending"), counted the replay as delivered, and ran the next message on the same process with
`includeHistoryContext: false`, so that Claude session never had the conversation. To do: read what a
blocked prompt looks like on the headless stream (the frames before the `result`), name the hook and
its reason in the note, finish as an error, and do not count the replay as delivered. This is a
likely cause of the location-switch empty turn below (a new cwd is a new key, so its next step
replays): check that session's Claude transcript for the same `blocked_by_hook` record before
building anything on the session-key theory.
- 2026-11-14 (evening), measured, not fixed: the wire-inactivity watchdog ended a turn while the child
lived on, unattached. The Mac idle-slept 21:10:23 to 21:20:56 CET (`pmset -g log`) during a designer
subagent's turn (`ses_e24dd447bffe3jnporpawTFbxI`, Claude session `3e7cd878`, about 777K tokens of
context). `result fallback timer fired` at 20:15:31Z, inside a dark wake; the turn ended as
`provider.unknown` and the subagent was reported failed. The CLI recorded `api_error`
`StreamSuspended` ("Connection lost while your computer was asleep") at 20:21:03Z, retried on its own
and carried on: a proxied `write` (20:22:46Z) and a proxied `bash` (20:32:56Z) each waited out the
10-minute deadline with no opencode step to serve them, a third call was parked at 20:43:52Z, and the
child died only when opencode restarted (about 20:48Z). That is about 28 minutes of a 777K-context
child nobody was listening to, drawn from the account's window, and its finished file never reached
the disk. Questions: should the watchdog interrupt or stop the child when it closes the turn; should
a system suspend (the CLI's own `StreamSuspended`, or a timer firing late after a sleep) hold the
watchdog rather than fire it; should a call queued with no stream attached be rejected at once
rather than at its deadline.
- 2026-11-14 (evening), the blocked replay: FIXED on `fix/blocked-prompt` (h #g314). A message a
`UserPromptSubmit` hook ends now fails the turn under a `▌ **prompt blocked:**` note quoting the
hook's reason, and a blocked replay drops its empty session so the next message replays again.
Why the switch replayed at all is fixed on the same branch (h #g315): the appical session's two
usage-limited turns never moved its resume record, so the by-hand switch to the default account
found their messages past it and refused the carry (`sibling-conversation-changed`). The
interactive transport is done on the same branch (2026-11-15, measured under a PTY on 2.1.322):
it reads the TUI's `promptSubmitEnding` record, ends the turn at once, and clears the text the TUI
hands back to its input box. The location-switch empty turn below was the same block (checked
2026-11-15, see that entry).
- 2026-11-14 (evening), the watchdog that closed a turn during a sleep: FIXED on `fix/blocked-prompt`
(h #g316). It counts wall-clock time, sleep included, so a fire well past its deadline now waits
again, and a fire that closes the turn interrupts the CLI. The start watchdog follows the same
late-fire rule, and both watchdogs wait out the backoff an `api_retry` frame announces. Left alone
on purpose: a proxied call queued with no stream attached (the late-result recovery path).

- 2026-11-14, found while fixing h #g312, not fixed (not in that PR's scope): dcp's `compact`
message reference (`\n@1044@`) is not stripped in two places that strip its XML form.
Expand All @@ -128,6 +110,14 @@
tool, so the lane stopped. Session `ses_e2898d33effeo0ojQzfvfWVOJK` (opencode.db), 2026-11-14. Check
whether a location switch mid-turn changes the session key (the cwd is in it) so the step after the
proxied `execute` result lands on a new key with no parked call and a fresh spawn.
2026-11-15, the empty turn is explained: the step started at 00:14:21Z (opencode.db seq 34, after
`location-switched` at 00:14:18Z) and at 00:14:27.770Z Claude Code recorded `blocked_by_hook`
("agent-guard: the prompt exceeds the assignment-probe scan cap ...", `promptKept: false`) in the
worktree cwd's transcript `a9e1ac0c-416d-4644-bd57-e70eae20aae6.jsonl`, so the new key replayed the
history and the guard refused it by size. h #g314 turns that into a `prompt blocked` note and an
error. Still open: that a location switch replays the thread at all (a new cwd is a new session key,
and Claude's transcript lives under the old cwd's directory). The `fix/session-move` worktree
(no commits yet) is where that would go.

- 2026-11-10, found by the pr173 lane (h #g295), not measured: Claude Code 2.1.322 adds fast mode on
Vertex, while `docs/models.md` says fast mode excludes Bedrock, Vertex and Foundry. Check on a Vertex
Expand Down Expand Up @@ -208,17 +198,19 @@ them ran in this directory.
Questions the maintainer still owes an answer on. Written here the turn they are
raised, so they survive context compaction; removed when answered, done or dropped.

- 2026-11-14: the blocked replay (Backlog, 2026-11-14 evening): fix the plugin side now, later, or
drop? Separate from that, agent-guard's prompt guard blocks any replay that quotes a secret-like
value: keep it blocking, or set `AGENT_GUARD_PROMPT_GUARD_MODE` for the plugin's spawns?
- 2026-11-14: agent-guard's prompt guard blocks any replay that quotes a secret-like value (the plugin
side is fixed, h #g314, and never sets the guard's variable itself): keep it blocking, or set
`AGENT_GUARD_PROMPT_GUARD_MODE` for opencode's environment? Your config, not the plugin's.
Deferred by the maintainer, 2026-11-15.
- 2026-11-14: watchdog follow-up, offered by an earlier turn of session
`ses_e324dbf7bffeRHQIz10AIxm7dT` (its reasoning went with that session's history): "should the
plugin wait a little longer after the CLI reports an API error before it closes the turn? Now,
later, or drop?" The sleep incident (Backlog, 2026-11-14 evening) is a second case and adds the
unattached child: now, later, or drop?
`ses_e324dbf7bffeRHQIz10AIxm7dT`: "should the plugin wait a little longer after the CLI reports an
API error before it closes the turn?" The sleep case is fixed, and both watchdogs now wait out the
backoff the CLI announces in its `api_retry` frame (h #g316). Deferred (2026-11-15): whether to wait
any longer than the CLI announces; the original case has no evidence on record.
- 2026-11-10: what to build next from Future Features (doctor warnings for setups that fail silently,
model aliases such as `opus`, a `task_send` to steer a background subagent, continuing a terminal
`claude` session in opencode): pick any, or hold.
Deferred again by the maintainer, 2026-11-15.
- 2026-10-08: subagent startup (~25 s). Maintainer: "do 1 but not fully just comment it out, 2 pin it, 3 lets
try 1 and 2 and see if 3 is needed". Done: `slack` parked under `_parkedMcpServers` in both Claude accounts'
`.claude.json` (pinned 1.3.0), opencode's slack pinned to 1.3.0 (backups `*.bak-slack-20261008-214042`).
Expand All @@ -240,6 +232,7 @@ raised, so they survive context compaction; removed when answered, done or dropp
Verification still owed, copied from the vault's `Future Features.md` "Next up" on 2026-10-24
(maintainer: "do the most recommended for all in 1 go"), because they are checks, not features.

Deferred again by the maintainer, 2026-11-15.
- Around 2026-11-08: review the progress estimate again, once the busy keys have 30+ samples.
The 2026-10-25 review (one week, read-only) found a forward test of 44 to 45% in band against
a 50% target, estimates about 13% long on the median, a typical miss of x2.2, worst on
Expand Down
Loading
Loading