Skip to content

Feat/local llm sources - #6

Merged
Lee-W merged 4 commits into
mainfrom
feat/local-llm-sources
Jul 17, 2026
Merged

Feat/local llm sources#6
Lee-W merged 4 commits into
mainfrom
feat/local-llm-sources

Conversation

@Lee-W

@Lee-W Lee-W commented Jul 17, 2026

Copy link
Copy Markdown
Owner

No description provided.

Lee-W added 4 commits July 16, 2026 09:02
…aiting

PermissionRequest fires when the permission system evaluates a tool
call, not when a human is actually being asked - subagent read-only
tool calls were flipping sessions red 105 times per 48h. Treat bare
PermissionRequest as working for every provider (previously codex
only); AskUserQuestion-shaped payloads still go straight to waiting.

Genuine prompts are covered by the permission_prompt Notification
Claude Code sends after ~6s of a prompt actually pending, which
already maps to waiting - the tool/command summary from the preceding
PermissionRequest is stashed (120s TTL) so that transition now shows
the real command instead of the generic permission message.

Trade-off: a real permission prompt turns red ~6s later than before;
false flapping and bogus notifications are gone.
Codex's hook channel has no user-decision event and goes silent while
an approval prompt is pending (verified against the 0.144.4 embedded
schemas: 10 lifecycle events, no heartbeat, notify only fires on
turn-complete), so silence after a bare PermissionRequest is itself
the signal. The read side now promotes a codex session to waiting
when its last hook event is a PermissionRequest older than
codex_permission_wait_seconds (default 10, 0 disables), reusing the
stashed command summary as waiting_detail; any later hook event
clears it. The TUI alert scheduler sends the system notification for
these promotions since no hook runs at promotion time.

Known limitations (documented in both READMEs): allow and deny are
indistinguishable, a denied prompt stays red until the next event,
and headless --watch does not send the promotion notification.
A turn that ends with the assistant asking a plain-text question
(no AskUserQuestion tool, no permission prompt) used to land on idle,
so the board never showed there was something to answer. Stop events
now inspect last_assistant_message (present in both claude-code and
codex payloads; transcript tail as fallback): if the last non-empty
line outside code fences ends with a question mark, the session goes
to waiting with kind=question and the question as detail.

Deliberately conservative - mid-message questions and statement
endings stay idle; detect_stop_questions=false turns it off.
@Lee-W
Lee-W merged commit d2f83b9 into main Jul 17, 2026
4 checks passed
@Lee-W
Lee-W deleted the feat/local-llm-sources branch July 17, 2026 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant