Skip to content

drop the failsafe for mcp clients from before tasks - #128

Open
hkonsti wants to merge 1 commit into
mainfrom
hkonsti/drop-pre-task-clients
Open

hkonsti wants to merge 1 commit into
mainfrom
hkonsti/drop-pre-task-clients

Conversation

@hkonsti

@hkonsti hkonsti commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Removes the failsafe from #119 (packages/api/src/mcp/pre-task-clients.ts and everything marked PRE-TASK CLIENTS): MCP clients whose session began before tasks had their calls without a task run for none, and were told the tool list changed. With it gone, every call but start_task, finish_task and send_feedback needs a task again, from any client.

Merge once no client is on it any more. Its calls are the only MCP requests logged with no task since #119 went out, so this should give no rows for a day or so first (set the date to when #119 was deployed):

SELECT a."agentId", count(*), max(a."createdAt")
FROM "AuditEntry" a
WHERE a.via = 'mcp' AND a."agentId" IS NOT NULL AND a."taskId" IS NULL
  AND a."createdAt" > '<deployed at>'
GROUP BY 1 LIMIT 50

An agent still showing up there has a client that never reloaded its tool list (or never keeps a session id); after this merges, its calls are refused until it reconnects.

Base automatically changed from hkonsti/agent-task-id-tracking to main October 21, 2026 00:52
@hkonsti
hkonsti force-pushed the hkonsti/drop-pre-task-clients branch from 12dde56 to 866287a Compare October 21, 2026 00:55

This branch has not been deployed

No deployments
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