Skip to content

Record a model for background work a remote Planner ran - #731

Merged
lavaman131 merged 1 commit into
mainfrom
record-attached-planner-model
Oct 27, 2026
Merged

lavaman131 merged 1 commit into
mainfrom
record-attached-planner-model

Conversation

@lavaman131

Copy link
Copy Markdown
Collaborator

Follow-up to #730. Once #730 let background workers run on a remote document's attached Planner, they still failed after doing their model work. Under HARNESS=remote an operator may leave MODEL unset, and the attached client then chooses its own model. Every worker recorded config.model as its artifact's model provenance, and the artifact validators refuse an empty one. So:

  • research failed with model is invalid after the evidence was gathered;
  • document descriptions, research briefs and History summaries failed with Background job … artifact is invalid.

Fix. workerModel() in jobs/worker-session.ts records attached-client when no model is configured. The research evidence and answer artifacts, document description, research brief and History summary all use it. What a worker asks for is unchanged: an empty model still reaches the attached client as no request.

Verified end to end. I ran a local server with HARNESS=remote, BACKGROUND_JOBS=on and MODEL unset, with a real Planner client attached over the agent connection. /research gathered evidence with two web_search calls on the client, published a report with 7 sources as a child document, and no job failed. Before this change the same run failed with model is invalid.

Tests. A new research-workspace.test.ts case runs the evidence definition with model: "" and parses its artifact. It fails with model is invalid without the change.

Assistant-model: Claude Opus 5.5 (fast)
Assistant-workflow: inline
Assistant-duration: 1h32m converged, estimated unmeasured
Assistant-verification: agent-browser manual scenario passed: local HARNESS=remote server with MODEL unset and a real attached Planner; /research published a 7-source report, and failed with "model is invalid" before the fix
Assistant-verification: red-before-fix passed: the new research-workspace test fails without the change
Assistant-verification: bun test unit passed: GIT_CONFIG_GLOBAL=/dev/null bun test (6737 pass, 0 fail)
Assistant-verification: typecheck and lint passed: bun run types and bun run ci
User-preference: Do not reveal internal details of downstream deployments in public Chopin artifacts
Co-authored-by: Alex Lavaee lavaman131@github.com

Under HARNESS=remote an operator may leave MODEL unset, and the attached client
chooses its own model. Every background worker recorded config.model as its
artifact's model provenance, and the artifact validators refuse an empty
model, so research, document descriptions, research briefs and History
summaries all failed after their model work had finished, with "model is
invalid" or "artifact is invalid".

Artifacts now record "attached-client" when no model is configured. What a
worker asks for is unchanged: an empty model still reaches the attached client
as no request.

Assistant-model: Claude Opus 5.5 (fast)
Assistant-workflow: inline
Assistant-duration: 1h32m converged, estimated unmeasured
Assistant-verification: agent-browser manual scenario passed: on a local HARNESS=remote server with MODEL unset and a real attached Planner, /research completed and published a 7-source report; before the fix the same run failed with "model is invalid"
Assistant-verification: red-before-fix passed: the new research-workspace test fails with "model is invalid" without the change
Assistant-verification: bun test unit passed: GIT_CONFIG_GLOBAL=/dev/null bun test (6737 pass, 0 fail)
Assistant-verification: typecheck and lint passed: bun run types and bun run ci
User-preference: Do not reveal internal details of downstream deployments in public Chopin artifacts
Co-authored-by: Alex Lavaee <lavaman131@github.com>
@lavaman131
lavaman131 merged commit 1be51b4 into main Oct 27, 2026
46 of 48 checks passed
@lavaman131
lavaman131 deleted the record-attached-planner-model branch October 27, 2026 04:13
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