Partial subagent config blocks Kit startup when harness is missing

Open
#222 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
cli, tooling

Research direction

Start with the configuration parsing path exercised by kit acp and reproduce the minimal TOML configuration from the issue. Add regression coverage showing that missing subagent.harness no longer blocks startup, while the incomplete configuration produces an actionable warning or safe fallback. Verify the repaired behavior with kit acp and the configuration-writing flow.

Written by the indexing model from the issue text.

Description

Summary

A partial [subagent] configuration makes Kit fail during startup when nested subagent settings exist but subagent.harness is missing. This should be an actionable warning with a safe fallback rather than a startup-blocking parse error.

In this case, another Kit session added an ACP harness and a model alias but did not add the newly required subagent.harness field. Every new Kit session then failed to open. Recovery was only possible because an existing Kit session was still running and could repair the configuration.

Environment

  • Kit: kit 0.2.1-herdr.1
  • Commit: c0a5df1 (Herdr overlay based on main 735409e)
  • OS: macOS (Darwin, arm64)
  • Installation: locally built release binary managed through mise
  • Reproduced with: kit acp (originally encountered while starting a new Kit session)

Minimal reproduction

Create ~/.kit/config.toml containing:

[acp.claude]
command = "true"

[subagent.harnesses."acp.claude".models]
fable = "example-model"

Then run:

kit acp

Actual behavior

Kit exits before it can start:

Error: Custom { kind: InvalidData, error: "invalid config ~/.kit/config.toml: could not parse config: missing field `harness`\nin `subagent`\n" }

The minimal reproduction exits with status 1. The same invalid configuration prevents opening a new interactive Kit session, which means Kit cannot be used to diagnose or repair its own configuration.

Expected behavior

Kit should remain startable and emit an actionable warning when nested subagent configuration exists without subagent.harness. A safe behavior could be to ignore/disable the incomplete subagent configuration until it is repaired, while clearly explaining how to fix it, for example:

kit config set subagent.harness acp.claude

At minimum, configuration-writing flows that add subagent.harnesses.* settings should ensure the required parent subagent.harness value is also present.

Impact

A single incomplete optional subagent setting locks users out of all normal Kit startup paths. Without another running session or external editor knowledge, recovery is difficult and circular.

Dominant language
Rust
Stars
40
Forks
4
Avg merge
4h 18m
Merged PRs (30d)
148

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from speakeasy-api/kit

All issues in speakeasy-api/kit

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.