Skip to content

fix(core): isolate scheduled prompt sessions by default - #1496

Closed
AaronZ345 wants to merge 2 commits into
chenhg5:mainfrom
AaronZ345:fix/cron-busy-side-session-20260705
Closed

fix(core): isolate scheduled prompt sessions by default#1496
AaronZ345 wants to merge 2 commits into
chenhg5:mainfrom
AaronZ345:fix/cron-busy-side-session-20260705

Conversation

@AaronZ345

Copy link
Copy Markdown
Contributor

Summary

  • Default cron and timer prompt jobs to a fresh agent session per run.
  • Keep the old shared-session behavior available only when session_mode = "reuse" or --session-mode reuse is set explicitly.
  • Update CLI help, config comments, docs, changelog, and tests for the new default.

Root cause

Scheduled prompt jobs inherited the active chat session by default. When a cron fired while the user session was already busy, it could fail with a busy-session error or wait behind unrelated interactive work. The scheduled task should be isolated by default instead of competing with normal chat turns.

Test Plan

  • go test -count=1 ./core ./config
  • GOOS=linux GOARCH=amd64 go test -c -tags no_web ./cmd/cc-connect
  • git diff --check

Supersedes #1349. This is the same rebased patch on a fresh PR branch.

@AaronZ345
AaronZ345 requested a review from chenhg5 as a code owner July 5, 2026 04:39
@AaronZ345
AaronZ345 force-pushed the fix/cron-busy-side-session-20260705 branch 2 times, most recently from 2e45d4a to 4c7508d Compare July 8, 2026 14:40
@AaronZ345
AaronZ345 force-pushed the fix/cron-busy-side-session-20260705 branch 2 times, most recently from 7e64047 to bc0a37f Compare July 14, 2026 03:05
@AaronZ345

Copy link
Copy Markdown
Contributor Author

Hi @chenhg5, I’ve rebased this PR onto the latest main and all five CI checks are green. Could you please take another look and merge it when you have a chance? Thanks!

@AaronZ345
AaronZ345 force-pushed the fix/cron-busy-side-session-20260705 branch 2 times, most recently from 7a41bfc to e409299 Compare July 19, 2026 14:44
@AaronZ345
AaronZ345 force-pushed the fix/cron-busy-side-session-20260705 branch from e409299 to 3bca008 Compare July 23, 2026 14:44
@AaronZ345

Copy link
Copy Markdown
Contributor Author

Superseded by #1651, which carries the same patch rebased onto the latest main on a fresh branch.

@AaronZ345 AaronZ345 closed this Aug 6, 2026
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