Repository navigation
Description
Summary
Every tool factory in uf-workflow and uf-finale that declares
parameters passes them under a parameters: key using plain
{ type, description } objects. The tool() helper from
@opencode-ai/plugin 1.4.10 expects an args: key holding a zod
raw shape (z.ZodRawShape). Because neither the key nor the format
matches, the SDK ignores the declaration, args is left undefined,
and opencode exposes an empty JSON schema to the model — the
model never learns the parameters exist.
Root cause
node_modules/@opencode-ai/plugin/dist/tool.d.ts:40-43:
export declare function tool<Args extends z.ZodRawShape>(input: {
description: string;
args: Args;
execute(args: z.infer<z.ZodObject<Args>>, context: ToolContext): Promise<ToolResult>;
})vs .opencode/plugins/uf-workflow/index.ts:497-506 (git_push):
parameters: {
setUpstream: { type: "boolean", description: "Set upstream tracking (--set-upstream origin <branch>)" },
branch: { type: "string", description: "Branch name (required when setUpstream is true)" },
},Wrong key (parameters vs args), wrong format (plain objects vs
zod schemas). Silently ignored — no type error, no runtime warning.
Affected tools (11 factories)
uf-workflow (.opencode/plugins/uf-workflow/index.ts):
checkpoint (line 234: command/step/data), get_progress (317),
clear_progress (355), normalize_model_name (413: rawModelId),
git_fetch (462: remote/branch), git_push (497:
setUpstream/branch), git_merge (558: ref), git_rebase (645: ref)
uf-finale (.opencode/plugins/uf-finale/index.ts):
uf_finale_commit_context (189: rawModelId), uf_finale_create_pr
(463: title/body/targetRepo), uf_finale_ci_poll (594: prNumber)
Control group: review-dispatch tools (use args: + zod, e.g.
index.ts:2513) and invoke-agent tools expose their full schemas to
the model at runtime.
Symptoms observed (two consecutive finales)
git_pushcalled bare (schema shows no params) runs plain
git push→ "no upstream branch" failure → manual
git push --set-upstream origin <branch>bash workarounds in the
opsx/unleash-direct-review-dispatchand
opsx/address-feedback-model-normalizationfinalesuf_finale_commit_contextnever receivesrawModelId→ commit
attribution degrades tounknown-model("Empty rawModelId
provided")normalize_model_namereturns "Empty rawModelId provided"uf_finale_create_pr(title/body/targetRepo) and
uf_finale_ci_poll(prNumber) parameters undiscoverable
This directly undermines #709: the migrated
/uf.address-feedback command now instructs the agent to call
normalize_model_name, whose rawModelId parameter is hidden by
this same bug.
Why tests missed it
.opencode/test/uf-workflow.test.ts:869-881 invokes execute
directly with { setUpstream: true, branch: "feat/my-branch" } and
asserts the resulting git command. The tool object never passes
through the SDK's schema path, so parameter exposure is never
asserted. Unit tests stay green while the model-facing contract is
broken.
Proposed fix
- Rename
parameters:→args:in all 11 factories. - Convert plain
{ type, description }objects to zod shapes
(z.string().describe(...),z.boolean(),z.number()). - Add a schema-exposure regression test asserting each tool
definition'sargscontains the expected keys.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNo status
Activity
jflowers commentedon Oct 15, 2026
Live confirmation from the PR #733 finale session: this is a hard
break for model-side invocation, not just undiscoverability.
Emitting an explicit
prNumberparameter in the tool invocation(despite the empty schema) does not reach
execute—uf_finale_ci_pollreturnsINVALID_PR_NUMBERboth with andwithout the parameter present in the call. The parameter is either
stripped by schema validation or forwarded untyped and rejected by
the tool's runtime validation; in both cases it never arrives as a
usable value.
Consequences confirmed in this session:
uf_finale_ci_pollcannot be pointed at a PR by the modeluf_finale_create_prcannot receivetitle/body— PR refactor(commands): resolve model attribution via normalize_model_name #733 wascreated via direct
gh pr createwith a temp body file insteadgit_pushcannot receive{setUpstream, branch}— bash fallbackrequired (second consecutive finale)
uf_finale_commit_contextcannot receiverawModelId— commitattribution degrades to
unknown-modelUnit tests stay green because they invoke
executedirectly withnative JS types, bypassing the schema path entirely.
test: pin seam-verification test layers and DE-007 pack rule
test: address PR 783 council feedback on seam-verification suites
docs: correct seam-verification evidence claims (PR 783)
test: pin seam-verification test layers and DE-007 pack rule
test: address PR 783 council feedback on seam-verification suites
docs: correct seam-verification evidence claims (PR 783)
test: pin seam-verification test layers and DE-007 pack rule
test: address PR 783 council feedback on seam-verification suites
docs: correct seam-verification evidence claims (PR 783)