Skip to content

🤖 fix: silence goal continuation skip log spam during streams#3325

Open
ammar-agent wants to merge 1 commit into
mainfrom
fix-goal-continuation-log-spam
Open

🤖 fix: silence goal continuation skip log spam during streams#3325
ammar-agent wants to merge 1 commit into
mainfrom
fix-goal-continuation-log-spam

Conversation

@ammar-agent
Copy link
Copy Markdown
Collaborator

Summary

Demote the WorkspaceGoalService: skipped goal continuation log to debug when eligibility is self-deferring, so we no longer spam one info line per second for the entire duration of every active stream.

Background

WorkspaceGoalService.buildGoalContinuationPayload runs whenever the idle dispatcher invokes the goal continuation consumer. For transient reasons (currently_streaming, initializing), checkGoalContinuationEligibility returns deferUntilMs = nowMs + 1_000 and scheduleContinuationReRequest re-arms a dispatch one second later. That self-rescheduling loop produced an info-level log every ~1s for the entire duration of a stream:

5:43.787PM workspaceGoalService.ts:736 WorkspaceGoalService: skipped goal continuation { workspaceId: '300037293d', reason: 'currently_streaming' }

Implementation

In buildGoalContinuationPayload, route the skip log through log.debug when eligibility.deferUntilMs != null (the self-retrying transient states) and keep log.info for terminal reasons (goal_mismatch, user_stop, plan_mode, archived, …) that fire at most once and remain useful diagnostic signal. A short comment near the log explains the policy so future edits don't accidentally re-promote these reasons.

Risks

Very low. Only changes log verbosity on one site; no eligibility logic, dispatch behavior, or persisted state is affected. Debug entries still surface when MUX_DEBUG=1 / MUX_LOG_LEVEL=debug or when an Output tab subscriber requests them, so on-demand diagnosis is preserved.

Validation

  • make static-check — clean
  • bun test src/node/services/workspaceGoalService.test.ts — 117/117 pass (no test asserted on this log line)

Generated with mux • Model: anthropic:claude-opus-4-7 • Thinking: max • Cost: $0.94

The goal continuation idle consumer self-reschedules ~1s while a stream
is active (eligibility returns currently_streaming/initializing with
deferUntilMs). Logging at info on every retry produced one line per
second for the entire stream duration. Demote to debug for the
self-deferring reasons; terminal reasons keep info.
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

ℹ️ 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".

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