Skip to content

fix(tots): close the MCP gaps Tots hit on 24 Nov - #92

Merged
CarsonJF merged 1 commit into
customfrom
feat/tot-mcp-gaps
Nov 25, 2026
Merged

CarsonJF merged 1 commit into
customfrom
feat/tot-mcp-gaps

Conversation

@CarsonJF

Copy link
Copy Markdown
Owner

Tots hit four MCP gaps on 24 Nov. This PR closes all four, each with tests.

What changed

  1. A Tot can edit its own instructions. renderTotAgents rewrites the t3-tot-instructions block from the saved instructions, so hand edits were lost. The new t3_tot_instructions tool reads the instructions, or replaces them when instructions is passed, through TotService.update, which re-renders AGENTS.md.
    • A Tot can reach only its own. Home, and a person at a client outside any thread, can reach any Tot's. Other agent threads are refused, and so are Tots on linked environments.
    • Writes need a live full-access caller.
    • Capped at the contract's 20,000 characters, checked by the schema.
    • The rendered block now tells the Tot to use the tool.
  2. schedule_task takes modelSelection on create and on update (scheduledTaskId). A task given one is marked modelPinned, so bound runs send that model instead of following the thread's current one. Without it, behaviour is unchanged (fix(server): thread-bound scheduled tasks run on the thread's current provider pingdotgg/t3code#18467). This needs a new model_pinned column (migration 113, idempotent; CUSTOM.md's migration-id note is updated). The full opencode-go/glm-5.3 is refused; flash variants are allowed. The task summary now includes modelSelection.
  3. t3_project_update reported defaultModelSelection: null. Settings are folded (projectSettingsFolded), so the project row's default_model_selection_json is never read again. The update wrote only to that row, and new threads never saw it. It now also writes the project's Settings override (null clears it). The reply reports the stored override even when a disabled provider or a hidden model keeps it from taking effect, which was a second way it showed null.
  4. list_scheduled_tasks returned []. A Tot's thread lives in the Tot's own project, so the default listing never reached the projects it owns. The "Custom nightly failure monitor" (no created_by_tot_id) is in T3 Code (fork), which T3Bot owns. Now, when a Tot omits projectId, the list also covers tasks in projects its scope names on this environment (all of them for scope all) and tasks it created. A note says that sidebar groups are not resolved, so their projects need an explicit projectId.

Overlap with feat/usage-limit-fallback

Most of the scheduled-task change stays in the MCP and schema layers. Two parts touch ScheduledTaskService.ts and may conflict with the sibling branch:

  • The model_pinned column added to the row type, SELECTs, INSERT and ON CONFLICT.
  • One line in sendBound: ...(active.modelPinned === true ? { modelSelection: active.modelSelection } : {}).

Both are small and mechanical to rebase. Failure and fallback logic is not touched.

agentContextBudget.json: the tool list grows by 647 bytes (71469 → 72116).

Checks

  • Focused suites with every T3CODE_* unset: OrchestratorMcpService, the project, tots and orchestrator toolkit handlers, totAgents, ScheduledTaskService, the 113 migration, the migration histories, AgentContextBudget.
  • vp run check:changed origin/custom --timeout 3000: format, lint, knip, typecheck (40 packages) and 17 of the 18 test files passed. The one failure was the context budget, which I then updated; that test now passes on its own.
  • Not run: the mcp-tool-use evals for the new or changed tool text (they use paid models).

🤖 Generated with Claude Code

- t3_tot_instructions reads or replaces a Tot's saved instructions and
  re-renders its AGENTS.md. A Tot reaches only its own; Home and a person
  at a client outside any thread reach any. Capped at 20,000 characters.
- schedule_task takes an optional modelSelection on create and update. A
  task given one pins it, so bound runs use it instead of following the
  thread's model (new model_pinned column, migration 113). The full
  opencode-go/glm-5.3 is refused; flash variants are fine.
- t3_project_update saves defaultModelSelection to the project's Settings
  override, where new threads read it, and the reply reports what is stored.
- list_scheduled_tasks with no projectId, called by a Tot, also lists tasks
  in the projects it owns and tasks it created, and notes that sidebar
  groups are not covered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@CarsonJF
CarsonJF merged commit a54f1ea into custom Nov 25, 2026
@CarsonJF
CarsonJF deleted the feat/tot-mcp-gaps branch November 25, 2026 04:41
CarsonJF added a commit that referenced this pull request Nov 25, 2026
- t3_tot_instructions reads or replaces a Tot's saved instructions and
  re-renders its AGENTS.md. A Tot reaches only its own; Home and a person
  at a client outside any thread reach any. Capped at 20,000 characters.
- schedule_task takes an optional modelSelection on create and update. A
  task given one pins it, so bound runs use it instead of following the
  thread's model (new model_pinned column, migration 113). The full
  opencode-go/glm-5.3 is refused; flash variants are fine.
- t3_project_update saves defaultModelSelection to the project's Settings
  override, where new threads read it, and the reply reports what is stored.
- list_scheduled_tasks with no projectId, called by a Tot, also lists tasks
  in the projects it owns and tasks it created, and notes that sidebar
  groups are not covered.

Co-authored-by: Custom Nightly Repair <repair@local>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
CarsonJF added a commit that referenced this pull request Nov 25, 2026
- t3_tot_instructions reads or replaces a Tot's saved instructions and
  re-renders its AGENTS.md. A Tot reaches only its own; Home and a person
  at a client outside any thread reach any. Capped at 20,000 characters.
- schedule_task takes an optional modelSelection on create and update. A
  task given one pins it, so bound runs use it instead of following the
  thread's model (new model_pinned column, migration 113). The full
  opencode-go/glm-5.3 is refused; flash variants are fine.
- t3_project_update saves defaultModelSelection to the project's Settings
  override, where new threads read it, and the reply reports what is stored.
- list_scheduled_tasks with no projectId, called by a Tot, also lists tasks
  in the projects it owns and tasks it created, and notes that sidebar
  groups are not covered.

Co-authored-by: Custom Nightly Repair <repair@local>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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