GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(server): schedule_task updates save freshSession by Karthik-beta · Pull Request #32367 · pingdotgg/t3code

Conversation

@Karthik-beta

@Karthik-beta Karthik-beta commented Nov 7, 2026

Copy link
Copy Markdown

Problem

Updating an existing scheduled task with schedule_task and freshSession: true returns success, but the task keeps its old thread mode. A later list_scheduled_tasks also shows freshSession: false. Switching a routine to fresh sessions currently means deleting and recreating it, which changes its id and loses its run history. Reported in #32258.

Change

The update branch of the schedule_task handler (apps/server/src/mcp/toolkits/orchestrator/handlers.ts) copied each update field into updateScheduledTask except freshSession. It now forwards freshSession too. The input schema and updateScheduledTask already accept it and turn it into the thread mode, so nothing else changes.

Scope and approval

This fixes the bug reported and reproduced in #32258. It also fits the exception for a very small fix of an obvious bug: the tool accepts the field and reports success but never applies it. The change is one handler line plus one test.

Verification

A new test in apps/server/src/mcp/toolkits/core.test.ts calls schedule_task through the in-process MCP server. It updates an existing task with freshSession: true and checks the threadMode the task store saves and the freshSession the caller gets back.

Without the fix (vp test run src/mcp/toolkits/core.test.ts -t freshSession):

× updating a scheduled task with freshSession saves and reports fresh sessions
AssertionError: expected [ 'new_thread' ] to deeply equal [ 'fresh_session' ]
Tests  1 failed | 20 skipped (21)

With the fix (vp test run src/mcp/toolkits/core.test.ts):

Test Files  1 passed (1)
Tests  21 passed (21)

vp fmt --check and vp lint on both files, vp run --filter t3 typecheck, and the pre-commit hook (fmt, lint, knip:check) pass. The test is its own commit before the fix, so the failure reproduces on that commit.

Not checked: I ran these on Node 24.22.2 on Windows, not the pinned Node 26.12.1. I also didn't drive the tool from a live agent session.

Written with Claude Opus 5.5 in Claude Code, and reviewed by me.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

baohappy02 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Karthik-beta added 2 commits November 7, 2026 12:24
@Karthik-beta
test(server): schedule_task updates keep freshSession
b0ee27e
Fails on main: the update path never forwards freshSession, so the task stays on new_thread.
@Karthik-beta
fix(server): schedule_task updates save freshSession
649ce33
The schedule_task update branch picked its fields out of the tool input and left out freshSession, so updateScheduledTask never saw it. An update reported success while the task kept its old thread mode.

Fixes pingdotgg#32258
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 7, 2026
macroscopeapp[bot]
macroscopeapp Bot approved these changes Nov 7, 2026
View reviewed changes
@macroscopeapp

macroscopeapp Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 649ce33

Macroscope's review found this PR approvable — Scheduled-task updates now save an explicitly supplied freshSession setting through the existing service. Defaults, access checks, and session-transition safeguards remain unchanged.

You can add or adjust custom eligibility rules. Learn more.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The scheduled-task update handler now forwards freshSession to updateScheduledTask. A test checks that an update saves "fresh_session" as the thread mode and reports freshSession: true.

Changes: Scheduled-task update

Layer / File(s) Summary
Forward freshSession and verify the update
apps/server/src/mcp/toolkits/orchestrator/handlers.ts, apps/server/src/mcp/toolkits/core.test.ts
The update handler passes freshSession to updateScheduledTask. The test checks the saved thread mode and the value returned by the tool.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related issues

  • pingdotgg/t3code#32258 — Reports that schedule_task updates drop freshSession; this change forwards the field and tests the saved and returned values.

Possibly related PRs

  • pingdotgg/t3code#30326 — Adds the freshSession input and thread-mode handling that this change forwards through the update handler.
  • pingdotgg/t3code#31696 — Addresses the same update path and adds regression coverage for the resulting fresh_session mode.
  • pingdotgg/t3code#25124 — Adds the schedule_task update branch that this change updates.

Suggested labels: bugfix

Suggested reviewers: t3dotgg

Merge Risk: Minimal · up to 649ce

No merge-blocking issue is identified; merge after normal checks.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title clearly describes the scheduled task update fix.
Description check Passed The description covers the problem, fix, scope, test results, verification limits, and agent attribution.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: main
  • File: .coderabbit.config.ts
  • Commit: 257e407
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f54bc236-6a73-4c39-8c46-9b9d395f3f38
Commits

Reviewing files that changed from the base of the PR and between 257e407 and 649ce33.

Files selected for processing: 2

  • apps/server/src/mcp/toolkits/core.test.ts
  • apps/server/src/mcp/toolkits/orchestrator/handlers.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@billvsd billvsd mentioned this pull request Nov 8, 2026
[Bug]: schedule_task silently drops freshSession when updating an existing task #32258
Closed
@juliusmarminge GitCafe Production

juliusmarminge commented Nov 10, 2026

Copy link
Copy Markdown
Member

Thanks for this. https://git.cafe/pingdotgg/t3code/pulls/31696 makes the same change and is the one being kept: Keep #31696 instead: it forwards the same field through the same update handler, with a smaller regression change that extends an existing test. All 31 reported checks pass, and its patch applies cleanly to current main. It addresses the same bug reported in #32258. Main still drops the field, so this is a duplicate rather than already implemented.

Closing as a duplicate.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge closed this Nov 10, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Nov 12, 2026
fix(server): schedule_task updates apply freshSession #34801
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@Karthik-beta @juliusmarminge
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.