Skip to content

Stop worker-finished notices from inviting thread_status polling (#1436) - #1582

Merged
currentbits merged 1 commit into
mainfrom
fix/1436-notice-footer
Oct 10, 2026
Merged

currentbits merged 1 commit into
mainfrom
fix/1436-notice-footer

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Fixes #1436. That issue was closed, but its fix only ever landed as a local-only merge and never reached GitHub. This is a port onto current main.

  • runnerHelpers.noticePrompt no longer appends the false "thread_status has full details" footer, which led orchestrators into 164 useless thread_status calls in one session. The new footer says the tool only repeats the reply line, and tells the lead to review the worker's branch with git.
  • The orchServer INSTRUCTIONS and the thread_status description now say: end your turn after fork/send, and don't poll, sleep or start watchers.
  • src/workerActivity.ts folds notices with the new footer and the legacy one, so notices already stored in transcripts keep folding. store-migrate's frozen legacy string is unchanged.

Tests: the crew-notices and orch-server assertions are updated. threadView gains a guard that the runner's footer matches the fold matcher, plus a legacy-footer fold test. The full electron suite (4539/4539) and the renderer suite (2943/2943) pass with this combined with #1435 and #1439 in a throwaway merge.

🤖 Generated with Claude Code

The notice footer claimed "thread_status has full details", but
thread_status only echoes the reply line, so leads called it in loops
(164 useless calls in one session). The footer now tells the lead to
review the worker's branch with git, and the orchestrator instructions
say to end the turn after fork/send instead of polling.

The renderer still folds notices stored with the old footer.

Ported from a local-only merge that never reached GitHub.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-10T09:51:50.080470Z 50ce256 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 50ce256677

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread electron/orchServer.js
Comment on lines +95 to +97
"its last assistant reply. Runs are asynchronous. After thread_fork or " +
"thread_send, end your turn: each worker's finish (done or failed) wakes you " +
"with a notice quoting its last reply. Do not poll thread_status, sleep, " +

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge End only after sends that guarantee a wake-up

When thread_send returns refused/undeliverable, or successfully targets an ordinary thread, no completion notice wakes the caller: thread_send does not establish handoffFrom, and queueOrchNotice only wakes the parent of an orchWorker. The unconditional instruction to end the turn therefore strands these workflows until the user manually prompts the lead again; condition it on dispatching an owned worker that will actually wake the caller.

Useful? React with 👍 / 👎.

Comment thread electron/runnerHelpers.js
Comment on lines +31 to +32
const NOTICE_FOOTER_LINE =
"\nContinue orchestrating. thread_status only repeats the reply line above, so do not call it for a finished worker; review its branch with git (log/diff against your branch) before reporting.";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve failure diagnostics before forbidding thread_status

For a worker finishing with status === "failed", queueOrchNotice includes only the first assistant-reply line and omits thread.lastError, whereas thread_status explicitly returns that stored or recovered error. Telling the lead that the tool only repeats the notice and must not be called can therefore hide the sole diagnostic for a failed run; include lastError in failure notices or retain a failure-specific status lookup.

Useful? React with 👍 / 👎.

Comment thread electron/runnerHelpers.js
Comment on lines +49 to +51
// #1436: thread_status only echoes the reply line; never invite polling.
// src/workerActivity.ts NOTICE_FOOTER must match this exactly to fold.
return headed + NOTICE_FOOTER_LINE;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restrict the worker-specific footer to worker completions

noticePrompt is also used for arbitrary deliverNotice traffic such as [peer from ...] and crew-task messages, so every such wake-up now directs the receiver to review “its branch” and report a finished worker even though no worker completion or branch is identified. Since peer_send can target any same-project thread, this can derail normal peer communication; append this footer only to actual worker-finished notices and keep a generic continuation for peer and crew notices.

Useful? React with 👍 / 👎.

@currentbits
currentbits merged commit faae1a0 into main Oct 10, 2026
6 checks passed
@currentbits
currentbits deleted the fix/1436-notice-footer branch October 10, 2026 10:01
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.

P1: Worker-finished notice sends leads into 164 useless thread_status calls — fix the false "full details" line and polling advice

1 participant