Skip to content

refuse unknown helper answers and keep the process host up under bursts - #451

Merged
xandreeddev merged 1 commit into
mainfrom
fix/m78
Nov 2, 2026
Merged

xandreeddev merged 1 commit into
mainfrom
fix/m78

Conversation

@xandreeddev

Copy link
Copy Markdown
Owner

What

  • answer_task (and Tasks.answer) under a question id that no pending question has now fails TaskControlRefused with reason unknown-question and its own pinned text, which points the parent at task_status; before, it got the child's "ask one question per turn" refusal. harnessCodeOf gives TaskMissing, TaskConflict and each task control reason a code of its own (TAGGED_REASON_CODES), so a process-host answer refusal now carries a frameworkCode. The Tasks kit's answer check catches the old behaviour.
  • @xandreed/process-host: a writer that finds every pending slot taken waits for a free one for at most writeTimeoutMs instead of failing at once with Capacity (which stopped the whole host); peer disposal wakes waiting writers and reports Closed. The ProcessPeer kit's writer-capacity check now requires the wait, with a self-test of a peer that refuses at once.
  • In full event mode, an event whose content is not JSON (a tool returning NaN, a BigInt or a Date) is sent as its labelled projection with a warning instead of stopping the connection.
  • The real subprocess journey now checks that a steer sent while a tool runs reaches the same turn's next model call, and pins each runtime's exit after the parent closes stdout. Node exits 1 (EPIPE); Bun 1.3 reports the write as successful and exits 0. The protocol reference states this precisely.
  • LangSmith: workspaceId selects the workspace of a key linked to several (sent as LangSmith's documented X-Tenant-Id). LLM runs carry langsmith.metadata.ls_model_name (response model, else request model, never over a host-set value), the metadata LangSmith prices by. The protocol option documents that LangSmith documents protobuf only.
  • Every package AGENTS.md "Model-facing text" table cites the lines that hold each text and its pin again (plugin-tasks, plugin-agent-loop, plugin-models, plugin-tool-discovery, plugin-workspace, core, sdk), after earlier changes moved them.
  • Migration: TaskControlRefused.reason gains unknown-question; TAGGED_CODES gains TaskMissing and TaskConflict; seven new task codes. No stored shape changes.

Checks

  • bun run typecheck: pass
  • bun test: 3666 pass, 5 fail under shared machine load (timeouts in foundry gate fixtures, a media-store kit, a sessions kit and a step-loop kit, all outside this change); each passes when re-run alone
  • bun run foundry demo, build:packages, verify:packages (Node 24 and Bun, including the new process-host journey keys), docs:generate (no diff), bun run --cwd packages/website check: pass

Answering a helper under a question id that no pending question has failed with the asker's one-question refusal, so the parent model was told to "ask one question per turn". It now fails `TaskControlRefused` with reason `unknown-question` and its own pinned text pointing at `task_status`. `harnessCodeOf` gives `TaskMissing`, `TaskConflict` and each task control reason a code of its own (`TAGGED_REASON_CODES`), so a process-host `answer` refusal carries a `frameworkCode`. The Tasks kit's answer check catches the old behaviour.

The stdio peer no longer fails a writer at once when every pending slot is taken: it waits for a free slot for at most `writeTimeoutMs`, and disposal wakes waiting writers with `Closed`. In full event mode an event whose content is not JSON is sent as its labelled projection instead of stopping the connection. The real subprocess journey now checks that a steer reaches the running turn's next model call and pins how each runtime exits after the parent closes stdout; the protocol reference states that Bun reports such writes as successful.

LangSmith export gains `workspaceId` for keys linked to several workspaces (LangSmith's `X-Tenant-Id`) and names an LLM run's priced model in `langsmith.metadata.ls_model_name`; the protocol option documents that LangSmith documents protobuf. Every package's model-facing text table cites the lines that hold each text and its pin again.
@xandreeddev
xandreeddev merged commit 97ed580 into main Nov 2, 2026
1 check passed
@xandreeddev
xandreeddev deleted the fix/m78 branch November 2, 2026 13:02
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