Skip to content

fix: settle orphaned evaluating interjections - #974

Merged
SamSaffron merged 1 commit into
SamSaffron:mainfrom
sam-saffron-jarvis:feat/orphan-interjection-state
Jul 28, 2026
Merged

fix: settle orphaned evaluating interjections#974
SamSaffron merged 1 commit into
SamSaffron:mainfrom
sam-saffron-jarvis:feat/orphan-interjection-state

Conversation

@sam-saffron-jarvis

Copy link
Copy Markdown
Contributor

What

Settle locally persisted interjection messages that remain evaluating after authoritative session state is idle and no live client transaction still owns them.

  • tracked pending commits/interjections remain untouched
  • orphaned evaluating messages transition to failed
  • the settled state is persisted, so reload does not resurrect the spinner

Why

An interjection is first rendered optimistically and persisted as a client-owned transcript intent. Its in-memory pendingInterruptCommits bookkeeping is not persisted. After a reload or interrupted recovery, the message can therefore survive forever as evaluating even though:

  • the server reports active_run: false
  • there is no server pending_interjection
  • there is no local pending commit or interjection transaction

Observed on session 3137: “this is taking forever” remained evaluating… for three hours while the server was idle and later turns had completed.

Invariant

An inline interjection may show evaluating only while a matching local pending commit or pending interjection transaction exists. Idle reconciliation marks unowned evaluating intents failed rather than leaving an immortal spinner.

Verification

  • node internal/serveui/static/app_stream_test.js
  • node internal/serveui/static/app_sessions_test.js
  • go test ./internal/serveui/...
  • go build .

@SamSaffron
SamSaffron merged commit e87cc14 into SamSaffron:main Jul 28, 2026
2 checks passed
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.

2 participants