You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[CLI] Subagent sessions trigger continuous schema rejection on metadata.variant #13620
When Kilo CLI spawns multiple read-only subagent sessions, the local runtime starts emitting a continuous schema rejection approximately once per second:
Expected JSON value, got undefined at [0]["metadata"]["variant"]
The parent session continues progressing, but the warning loop persists until the session is disposed.
Environment
Kilo CLI: 7.5.6
Operating system: macOS
Provider: custom OmniRoute provider (provider credentials and private configuration omitted)
Agent type involved: explore subagents
Actual behavior
After three explore child sessions are created, the log records child-session entries containing:
model=undefined
metadata=undefined
The first schema rejection appears about one second after the child sessions are created and then repeats at roughly one-second intervals. The parent session continues making progress and can still invoke tools.
Expected behavior
Session metadata should be normalized before it is serialized or validated. Missing optional fields should not cause an unbounded polling/retry loop or repeated warnings.
Impact
Significant log growth
Unnecessary CPU and disk I/O
Increased diagnostic noise
No evidence of source-code corruption or provider-side failure
The parent task may continue, but the runtime becomes degraded while the affected child sessions remain active
Additional observations
A fresh Kilo start without spawning subagents did not produce this warning.
The warning stops when the affected session is disposed.
The issue appears to be local session/event serialization rather than a model response error, although the exact endpoint or source location is not yet confirmed.
No credentials, tokens, cookies, session identifiers, or raw logs are included in this report.
Plugins
None relevant; custom OmniRoute provider used (private details omitted)
Kilo version
7.5.6
Steps to reproduce
Start Kilo CLI 7.5.6 on macOS.
Start a coding session in a project.
Ask the primary agent to create three read-only explore subagents in parallel.
Observe the Kilo log while the child sessions are active.
The subagent tool-part metadata in packages/opencode/src/tool/task.ts always included the variant key even when no model variant was selected, leaving an undefined value in the in-memory metadata object. JSON-valued schema validation rejects undefined, which produced the repeated Expected JSON value, got undefined at [0]["metadata"]["variant"] warning after spawning explore subagents.
The construction-side fix (omitting variant when undefined) already landed on main in commit dd390c1930 (PR #13641). A regression test locking in the JSON-clean metadata is added in PR #13688.
The subagent tool-part metadata in packages/opencode/src/tool/task.ts always included the variant key even when no model variant was selected, leaving an undefined value in the in-memory metadata object. JSON-valued schema validation rejects undefined, which produced the repeated Expected JSON value, got undefined at [0]["metadata"]["variant"] warning after spawning explore subagents.
The construction-side fix (omitting variant when undefined) already landed on main in commit dd390c1930 (PR #13641). A regression test locking in the JSON-clean metadata is added in PR #13688.
Thanks for investigating and fixing this! I'll close the issue as resolved.
Activity
maphew commentedon Sep 2, 2026
Root cause confirmed and fixed.
The subagent tool-part metadata in
packages/opencode/src/tool/task.tsalways included thevariantkey even when no model variant was selected, leaving anundefinedvalue in the in-memory metadata object. JSON-valued schema validation rejectsundefined, which produced the repeatedExpected JSON value, got undefined at [0]["metadata"]["variant"]warning after spawningexploresubagents.The construction-side fix (omitting
variantwhen undefined) already landed on main in commitdd390c1930(PR #13641). A regression test locking in the JSON-clean metadata is added in PR #13688.Natan-M64 commentedon Sep 2, 2026
Thanks for investigating and fixing this! I'll close the issue as resolved.
test(cli): cover JSON-clean task metadata without a selected variant (#…