Skip to content

fix: label agent-worker config fields for editable console forms - #381

Merged
rohitg00 merged 1 commit into
mainfrom
fix/agent-worker-config-labels
Jul 1, 2026
Merged

rohitg00 merged 1 commit into
mainfrom
fix/agent-worker-config-labels

Conversation

@rohitg00

@rohitg00 rohitg00 commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor

What

The console builds each worker's config form from its published config schema. Fields with no description render as unlabeled / empty grey inputs, so the agent workers' configs looked non-editable. Documented every config field that lacked a description across the agent workers so each renders as a labeled, editable field.

Changes

Worker Mechanism
codex (Rust) /// doc comments on Defaults + Config → schemars emits description
claude-code (TS) .describe() on each Zod config field → z.toJSONSchema emits description
pi (TS) same
opencode (TS) same

hermes already documents its config schema; grok is fixed on its own branch (#378).

Verified

Dumped each worker's generated schema and confirmed descriptions now land at the top level and on nested defaults.* fields. No behavior change (comments / schema metadata only).

  • codex: fmt + clippy -D warnings clean, 32 tests
  • claude-code: biome clean, 75 tests
  • pi: biome clean, 69 tests
  • opencode: biome clean, 64 tests

Doc/metadata-only, so no version bumps.

Summary by CodeRabbit

  • Documentation
    • Added clearer descriptions to several configuration options across the apps, improving in-product schema help and generated config docs.
    • Expanded field-level explanations for default settings and runtime flags, making configuration behavior easier to understand.

The console builds the worker-config form from each worker's published
config schema; fields with no description render as unlabeled/empty inputs.
Documented every config field across the agent workers that lacked it, so
each renders as a labeled, editable field:

- codex (Rust): /// doc comments on Defaults + Config (schemars -> description).
- claude-code / pi / opencode (TS): .describe() on each Zod config field
  (z.toJSONSchema -> description).

hermes already documents its config schema; grok is fixed on its own branch.
No behavior change. Verified the generated schema now carries per-field
descriptions (top-level + nested). codex 32 tests, claude-code 75, pi 69,
opencode 64 — all pass; fmt/clippy/biome clean.
@vercel

vercel Bot commented Jul 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
workers Ready Ready Preview, Comment Jul 1, 2026 11:08am
workers-tech-spec Ready Ready Preview, Comment Jul 1, 2026 11:08am

Request Review

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

skill-check — worker

0 verified, 29 skipped (no docs/).

Layer Result
structure ✓
vale ✓
ai ✓
render ✓

Four for four. Nicely done.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d14e5acc-f38b-48dc-8ba6-43c9376c77de

📥 Commits

Reviewing files that changed from the base of the PR and between 35ced95 and 9b6cac6.

📒 Files selected for processing (4)
  • claude-code/src/config.ts
  • codex/src/config.rs
  • opencode/src/config.ts
  • pi/src/config.ts

📝 Walkthrough

Walkthrough

This PR adds descriptive metadata to configuration schemas across four packages (claude-code, codex, opencode, pi). Zod .describe(...) annotations were added to schema fields in TypeScript files, and Rust doc comments were added to struct fields in codex. No defaults, types, or validation logic changed.

Changes

Config schema documentation

Layer / File(s) Summary
Claude Code schema descriptions
claude-code/src/config.ts
Expands defaults field definitions from shorthand to explicit chained validators with added .describe(...) metadata for model, permission_mode, max_turns, cwd, append_system_prompt, allowed_tools, disallowed_tools.
OpenCode schema descriptions
opencode/src/config.ts
Adds .describe(...) metadata to model, cwd, and agent fields while preserving default values and structure.
Pi schema descriptions
pi/src/config.ts
Adds .describe(...) metadata to defaults sub-object fields and top-level events_stream, raw_events_stream, iii_context fields.
Codex struct doc comments
codex/src/config.rs
Adds Rust doc comments to Defaults and Config struct fields explaining semantics and default/empty behavior.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Poem

Metadata hops in, soft and neat,
Describing fields with tidy feet,
No logic changed, no bug to chase,
Just comments dressed in gentle grace,
This rabbit thumps in sheer delight! 🐇📝

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding labels/descriptions to agent-worker config fields for editable console forms.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/agent-worker-config-labels

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rohitg00
rohitg00 merged commit 2aecb48 into main Jul 1, 2026
18 checks passed
@rohitg00
rohitg00 deleted the fix/agent-worker-config-labels branch July 1, 2026 11:29

This branch was successfully deployed

2 active deployments
Preview – workers-tech-spec — 9b6cac6b Deployed Jul 1, 2026 by vercel[bot]
Preview – workers — 9b6cac6b Deployed Jul 1, 2026 by vercel[bot]
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