Skip to content

fix(code-mode): publish canonical tool inputs - #194877

Closed
sasan1200 wants to merge 13 commits into
openclaw:mainfrom
sasan1200:feat/gemini-code-mode-inputs
Closed

sasan1200 wants to merge 13 commits into
openclaw:mainfrom
sasan1200:feat/gemini-code-mode-inputs

Conversation

@sasan1200

@sasan1200 sasan1200 commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Closes #194865

What Problem This Solves

  • Provider schema projections can remove literal constraints from Code Mode guidance. Gateway policy narrowing can leave denied actions in catalog schemas.

User Impact

  • Code Mode declarations retain canonical input types and show only permitted actions.

Why This Change Was Made

  • Preserve canonical schemas through provider normalization and collector restriction.
  • Apply gateway action policy to projected, canonical, and presentation schemas before catalog registration and compaction.

Evidence

  • Before (7872998), a catalog fixture rejected boolean true and fastMode: "auto" after reader restriction and after the restricted wrapper was registered.
  • Before (8c131cd11113), production-owner capture showed a list-only registration publishing list and status when the tool was assembled with both actions.
  • At b905def2e430: 97 focused tests (12.60s), test types, targeted lint and formatting, line and assertion ratchets, and build passed.
  • Source-boundary fixture: after reader restriction and wrapper registration, the catalog retained optional: true, removed collect, and accepted boolean true and fastMode: "auto".
  • Production-owner capture: assembly with list and status, followed by list-only registration, returned list in both the catalog schema and declaration.
  • Built CLI with a loopback model fixture: list-only catalog input and declaration; optional missing-file read returned not_found with boolean true.
HEAD b905def2e430b14f9d39c9d999936c8ba7023f20
BUILD_ID 2026.11.3-b905def2e430-2026-11-13T19-08-20.279Z
{
  "actionEnum": [
    "list"
  ],
  "inputAction": "\"list\"",
  "optionalLiteral": "true",
  "readResult": {
    "kind": "not_found",
    "status": "not_found",
    "path": "missing-policy-proof.txt",
    "optional": true
  }
}

@clawsweeper

clawsweeper Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation agents Agent runtime and tooling size: S labels Nov 7, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-08T02:32:19.679565Z 7872998 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 322b961189

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/agents/agent-tool-availability.ts Resolved
@clawsweeper clawsweeper Bot added the clawsweeper:intake:bug Preliminary submission classification; full source review pending. label Nov 8, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 8, 2026
@clawsweeper

clawsweeper Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

This PR publishes bounded canonical tool inputs in Code Mode and Tool Search while preserving provider projections and permitted-action restrictions.

Example: A Google-backed Code Mode session reads missing-policy-proof.txt with optional: true.

  • Before: The provider projection loses the true literal constraint in the generated input guidance.
  • After: The declaration advertises optional?: true, and the supplied CLI capture returns structured not_found with optional: true.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused production-owner repairs, relevant regressions, and exact-head shipped-CLI evidence support the change; enforced security approval remains a separate gate.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): At the exact reviewed head, supplied built-CLI output through a loopback model fixture shows list-only catalog guidance, canonical true input guidance, and the real read handler returning not_found; owner-boundary captures additionally cover restricted collector schemas.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Agents following generated tool inputs can submit arguments that canonical validation rejects or actions deployment policy denies.
Reason: Accurate capability guidance is an existing runtime contract, and the repair adds no configuration or product policy.

Merge readiness

⛔ Blocked before merge - 1 item remains

This PR repairs a remaining mismatch between tool guidance and accepted inputs, including collector restriction and policy narrowing; no actionable correctness finding remains.

Priority: P2
Reviewed head: b905def2e430b14f9d39c9d999936c8ba7023f20

Before merge

  • Await maintainer action - A maintainer must review the Gateway policy change and approve b905def with /allow-security-sensitive-change.

Findings

None.

Agent review details

How this fits together

Agent finalization projects tool schemas for providers; availability and Gateway policy restrict them before Tool Search publishes hints and Code Mode generates declarations.

flowchart TD
  A[Tool input contracts] --> B[Availability preparation]
  B --> C[Provider schema finalization]
  C --> D[Canonical schema metadata]
  D --> E[Policy and collector transformations]
  E --> F[Tool Search catalog]
  F --> G[Code Mode declarations]
  F --> H[Validated tool execution]
Loading

Technical review

Best possible solution:

Keep bounded canonical guidance in the existing schema metadata owner and apply availability and action restrictions consistently across all schema representations.

Do we have a high-confidence way to reproduce the issue?

Current-main catalog publication consumes provider-projected parameters, while canonical validation is retained separately; the linked report and supplied before/after captures demonstrate the resulting guidance mismatch without running target code during this review.

Is this the best way to solve the issue?

The patch fixes the existing publication and transformation owners, preserves execution-only precedence and provider normalization, and adds distinct regressions for depth bounds, collector lifecycle, and policy narrowing.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 77a0a8426513.

Provenance checked

  • Canonical input metadata and catalog guidance changes intended behavior with a stated reason (afbe0a8: Repair local validation against canonical schemas while leaving advertised schemas unchanged.)
  • Collector schema retention keeps the original intent (829a681: Preserve provider-normalized collector fragments across availability changes and hook wrappers.)
  • Offered versus callable collector capabilities keeps the original intent (b326dc0: Keep session tool definitions stable while checking execution authority separately.)
  • Gateway action policy keeps the original intent (1bd22b2: Restrict advertised actions and authorize final arguments under captured deployment policy.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Introduced change and current-main comparison: The pinned introduced diff adds canonical presentation metadata and routes catalog publication through it; fetched main still publishes tool.parameters directly. (src/agents/tool-search-catalog.ts:221, b905def2e430)
  • Earlier findings addressed: Collector preparation runs before normalization, canonical presentation uses bounded publication, and the shared transformation updates projected, canonical, and presentation schemas. These address the earlier availability, depth, and narrowing concerns raised in review and by saariuslystoned; Yigtwxx also documented the collector repair. (src/agents/agent-tool-availability.ts:156, b905def2e430)
  • Exact-head behavior evidence: The current PR body identifies b905def and its build, reports a built CLI using a loopback model fixture, and supplies output showing list-only catalog guidance, the true literal, and a successful optional missing-file read. (b905def2e430)
  • Related fixes retain distinct scope: fix(ai): validate local tool input against the canonical schema #185581 repaired canonical local validation while deliberately preserving advertised schemas; fix(ai): drop Gemini enums on non-string schemas #196742 repaired Gemini wire acceptance by dropping non-string enums, which does not restore canonical literals or unions in guidance. (src/agents/agent-tools.finalize.ts:254, 543917c0d292)
  • Enforced current-head approval: The current head is mergeable, but security-sensitive review remains pending and ci-gate explicitly requires maintainer approval; these are approval gates rather than demonstrated patch-caused test failures. (src/agents/gateway-tool-policy.ts:166, b905def2e430)
  • Policy and history inspection: Root and applicable agent/docs instructions were read and applied; .agents/maintainer-notes is absent. Feature history spans the earlier tool-search.ts owner, schema finalization, collector retention, and deployment policy. One historical content search encountered the local lazy-fetch limit; determining source and provenance were otherwise available. (src/agents/AGENTS.md:7, 77a0a8426513)

Likely related people:

  • Peter Steinberger: Raw commit af9ba2a adds src/agents/subagents/swarm/swarm-collector-capability.ts:54 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: af9ba2adc7ca; files: src/agents/subagents/swarm/swarm-collector-capability.ts)
  • yy19971996: Raw commit afbe0a8 adds src/agents/agent-tool-availability.ts:129 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: afbe0a8e8f2c; files: src/agents/agent-tool-availability.ts)
  • stevenlee-oai: Raw commit 1bd22b2 adds src/agents/gateway-tool-policy.ts:117 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 1bd22b28d632; files: src/agents/gateway-tool-policy.ts)
  • Jony: Raw commit 829a681 adds src/agents/subagents/swarm/swarm-collector-capability.ts:61 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 829a68199122; files: src/agents/subagents/swarm/swarm-collector-capability.ts)

PR surface

Source +65, Tests +219, Docs +1, Other +2. Total +287 across 10 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 5 92 27 +65
Tests 3 231 12 +219
Docs 1 4 3 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 10 329 42 +287

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Root-cause cluster

Relationship: same_root_cause
Canonical: #194865
Summary: This PR implements the canonical input-guidance repair; the merged Gemini wire fix addresses a separate boundary.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.
  • remove status: 👀 ready for maintainer look: Current PR status label is status: ⏳ waiting on maintainer.

Label justifications:

  • P2: Incorrect generated input guidance causes rejected tool calls and wasted agent turns on a bounded tool-discovery surface.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (4 earlier review cycles)
  • reviewed 2026-11-08T00:07:55.723Z sha 322b961 :: needs changes before merge. :: [P1] Preserve availability transformations when recovering canonical inputs | [P2] Use parameter-bearing types for the new schema metadata accesses
  • reviewed 2026-11-08T00:55:38.558Z sha c9b02dc :: needs changes before merge. :: [P2] Bound canonical schemas before exposing them through the catalog
  • reviewed 2026-11-08T01:21:14.176Z sha 06f1f7d :: needs maintainer review before merge. :: none
  • reviewed 2026-11-08T02:30:53.693Z sha 7872998 :: needs maintainer review before merge. :: none

Reviewed November 13, 2026, 2:34 PM ET / 19:34 UTC (Revision 5).

@sasan1200

Copy link
Copy Markdown
Contributor Author

@codex review

@sasan1200

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added the clawsweeper:intake:bug Preliminary submission classification; full source review pending. label Nov 8, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c9b02dcceb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/agents/tool-search-catalog.ts Resolved
@clawsweeper clawsweeper Bot removed the clawsweeper:intake:bug Preliminary submission classification; full source review pending. label Nov 8, 2026
@sasan1200

Copy link
Copy Markdown
Contributor Author

@codex review

@sasan1200

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Nov 8, 2026

Copy link
Copy Markdown
Contributor

The policy-narrowing concern still appears valid at 7872998.

In copyAgentToolAvailability(), unchangedProjection checks only the source parameters. When applyGatewayToolPolicy() copies an already-finalized tool with narrower target parameters, the copy retains the broader canonical presentation but records the narrowed target as projected. resolveAgentToolPresentationSchema() then returns that broader presentation during catalog registration.

For example, a finalized tool supporting list | patch, subsequently registered under a list-only policy, can still advertise patch through tool_describe, compact hints, and generated declarations. Execution-time policy enforcement still rejects it, so this is a guidance/contract mismatch rather than an authorization bypass.

Could we preserve target-side restrictions when carrying canonical metadata across the copy, and add a regression covering finalize → narrower policy → headless registration/catalog compaction? The assertion should check that forbidden actions stay absent while canonical boolean types remain intact.

@roboclaw-bot roboclaw-bot added the clawtributors PR from a clawtributor label Nov 8, 2026

@Yigtwxx Yigtwxx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at 7872998cec3. I ran the touched tests and a probe against both the PR head and the merge-base (b6ed90743ed) versions of the four production files. Setup: Windows, Node 24.22.1, vitest.agents-core.config.ts.

What holds

  • tool-search-runtime.test.ts, agent-tool-availability.test.ts, and gateway-tool-policy.test.ts pass 78/78 on the head.
  • Mutation check: removing prepareBeforeNormalization: true from the collector binding turns both keeps canonical collector inputs aligned with an offered reader rows red, so those tests do guard that line.
  • The branch merges with current main without conflicts (git merge-tree). The only main commit since the merge-base that touches these files is #194769 (internals.md).
  • The PR also fixes something the body doesn't mention. Real sessions_spawn declares fastMode: boolean | "auto" | "ultrafast". On the merge-base, the Gemini projection collapses that field to {"type":"boolean"}, so the Code Mode declaration says fastMode?: boolean and catalog validation rejects "auto". On the head, the full union is advertised and "auto" validates. That could be one line in the body.

1. Per-attempt catalog restriction that drops agents_wait brings the projection back for sessions_spawn. This is a scope gap, not a regression.

src/agents/harness/prompt-tool-policy.ts:81 calls restrictToolSearchCatalog with the attempt's toolsAllow. finalizeCatalogAvailability then reruns every availability binding (tool-search-catalog.ts:295). When the reader is missing, the collector prepare replaces entry.tool.parameters with collectorSchema(projected, {}) (swarm-collector-capability.ts:131-136). That new object is not bound.projected, so resolveAgentToolPresentationSchema (agent-tool-availability.ts:164) returns the projected variant. Catalog validation follows it too, because the collector's executionSchema returns the entry schema unchanged outside a joined spawn (swarm-collector-capability.ts:146-149).

Measured with the real createSessionsSpawnToolSchema({ swarmEnabled: true, ... }): Google finalize with spawn and a marked reader, then restrictToolSearchCatalog:

catalog keeps agents_wait merge-base head
yes fastMode?: boolean, "auto" rejected fastMode?: boolean | "auto" | "ultrafast", "auto" accepted
no fastMode?: boolean, "auto" rejected fastMode?: boolean, "auto" rejected

I used the same setup with a fixture field optional: Type.Optional(Type.Literal(true)) and the reader left out of registerHeadlessToolSearchCatalog. The head then declares optional?: "true", and catalog validation rejects optional: true. That is the original issue, on the hidden-reader path.

The hidden-reader rows at tool-search-runtime.test.ts:345-353 miss this because that spawn fixture has only task, collect, outputSchema, and groupId, and none of them change under Gemini projection. Adding one literal field to that fixture, plus a const assertion on the hidden entry, would catch it.

Two ways to close it:

  • Derive the collector variant from the bound presentation as well. collectorSchema only cares about object shape, so the same call works on the presentation.
  • Name the restricted-attempt case as an accepted edge case in the body or docs and pin it with a test row.

2. Presentation precedence on schema-replacing copies. No change requested; I'm noting it so the assumption is written down.

copyAgentToolAvailability (agent-tool-availability.ts:49) now keeps the source presentation when the source schema is unchanged, even if the target carries a different parameters object. The only post-finalize copy that replaces the schema is applyGatewayToolPolicy (gateway-tool-policy.ts:164), which the catalog reruns (tool-search-catalog.ts:247, :553).

Measured with a sessions action tool, catalog policy actions: ["list"]:

finalized tool was assembled with merge-base head
same policy (["list"]) action: "list", optional?: "true" action: "list", optional?: true
wider policy (["list","patch"]) or none action: "list" action: "list" | "patch"

In both cases the executor still denies patch. The second row also reproduces with modelProvider: "openai", so it is not specific to Gemini. In the run path, applyGatewayToolPolicy runs before finalizeAgentTools (agent-tools.ts:566, :647) with the same config the catalog reads. I didn't find a caller that hands the catalog a different policy, so I don't see a reachable case today.

I tried the obvious tightening: drop the presentation whenever the target replaces parameters. It breaks the normal first row, because narrowActions always returns a new object, so optional?: "true" comes back. I'm not suggesting it. A one-line comment at copyAgentToolAvailability would cover it, saying that post-finalize schema replacements are expected to match the assembly-time projection.

CI

checks-fast-baseline-ratchets fails on test-lines: Test lines: 6571368; ceiling: 6571329; over by: 39; net delta: +145. That ceiling already includes the new 152 allocation, which means the ratchet base was about 46 lines over before this PR. The script accepts an exact grant up to delta + inheritedDebt (scripts/check-test-lines-ratchet.mts:197-200). That allows 191 at that base; trimming 39 lines would also pass. Recompute against the current ci-ratchet-base before changing the file.

@Yigtwxx Yigtwxx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up at 8c131cd1111. Finding 1 from my earlier review is closed.

I reran the same probe on this head and on the previous code (7872998 versions of swarm-collector-capability.ts and agent-tool-availability.ts): real createSessionsSpawnToolSchema({ swarmEnabled: true, ... }), Google finalize, then restrictToolSearchCatalog. I also added rows with the before-tool-call hook wrapper on. The run path wraps by default (agent-tools.ts:650), and the PR test uses wrapBeforeToolCallHook: false, so I wanted that path covered too.

"Full union" below means the declaration fastMode?: boolean | "auto" | "ultrafast".

catalog keeps agents_wait hook wrapper 7872998 8c131cd
yes off full union, "auto" accepted full union, "auto" accepted
no off fastMode?: boolean, "auto" rejected full union, "auto" accepted
yes on full union, "auto" accepted full union, "auto" accepted
no on fastMode?: boolean, "auto" rejected full union, "auto" accepted
  • Touched tests (tool-search-runtime.test.ts, agent-tool-availability.test.ts, gateway-tool-policy.test.ts) pass 78/78 on Windows, Node 24.22.1.
  • Mutation check: with only swarm-collector-capability.ts reverted to 7872998, advertises canonical Gemini inputs while keeping execution-only exec arguments hidden fails on properties.optional.const. The new restricted-catalog rows do guard the collector change.
  • The branch still merges cleanly with current main (c74d7a70ae1). No main commit since your sync touches the changed source files.

Note 2 (gateway narrowing precedence) behaves the same on this head, and my probe rows match the earlier table. Still no change requested there.

Nothing else from me.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Maintainer security review required

This external contributor PR changes sensitive security components. A maintainer must review these changes before merging.

Current SHA: b905def2e430b14f9d39c9d999936c8ba7023f20

These sensitive security changes were made:

  • src/agents/gateway-tool-policy.ts: Controls sandbox containment or tool execution authority. Check filesystem and network isolation, approval scope, and command allowlists.

After reviewing the changes, post a new PR comment containing only approval commands, each on its own line:

/allow-security-sensitive-change

A later push requires a fresh approval comment.

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 13, 2026
@obviyus

obviyus commented Nov 14, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the careful work and the detailed evidence here. I'm closing this because neither problem reproduces on current main (45e2704) in a live end-to-end run.

I used a scratch Gateway started from source with Code Mode on and a real Gemini 3.8 Flash model:

  • The generated tools/read.d.ts now declares optional?: boolean (no string literal). Gemini followed it, and read on a missing file returned the structured not_found result.
  • With tools.gatewayPolicy allowing only automations: ["list"], the Code Mode declaration's input type is action: "list".

This branch is also about 240 commits behind and conflicts on rebase. If you can still trigger a failure on current main without telling the model which value to send, please open a fresh issue with that case and we'll take another look.

@obviyus obviyus closed this Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling clawtributors PR from a clawtributor docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. security-review-required security-sensitive-changed size: M status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Code Mode suggests string booleans

5 participants