The depth limit (default maxDepth=3) was being silently bypassed when
sync-task.ts could not reach the manager's spawn enforcement methods --
the fallback hardcoded childDepth: 1, allowing infinite recursion of
delegate_task calls in degraded environments.
This was hard to catch because:
1. The fallback path took the dangerous default silently (no log).
2. There were no end-to-end smoke tests asserting that the depth value
coming back from reserveSubagentSpawn is actually used.
3. The unit tests for resolveSubagentSpawnContext only covered error
cases, not the actual depth calculation.
Changes:
- sync-task.ts: split the spawnContext fallback into an explicit if/else
with a WARNING log when the manager is missing enforcement methods.
This makes the dangerous path observable in logs.
- subagent-spawn-limits.test.ts: add depth calculation regression tests
(root, depth-1, depth-2, depth at max, parent cycle detection).
- sync-task.test.ts: add two regression smoke tests:
1. depth limit error from reserveSubagentSpawn must be propagated and
must NOT create the session.
2. spawnDepth recorded in metadata must equal what reserveSubagentSpawn
returns -- guards against silent fallback to childDepth: 1.
15 new spawn-limits tests + 2 new sync-task tests pass.
Full suite: 5105 pass, 0 fail.
- Update plugin-interface.test.ts expectations to use getAgentListDisplayName
- Update chat-message.test.ts expectations for agent display names
- Add smoke test for quoted plan name resolution in chat-message.test.ts
- Aligns test expectations with proper agent name formatting
🤖 Generated with OhMyOpenCode assistance
- Use getAgentListDisplayName instead of getAgentDisplayName for Atlas in start-work-hook.ts
- Update test expectations in index.test.ts to match the correct display name format
- Ensures Atlas agent name uses proper list format (e.g., "Atlas - Orchestrator")
🤖 Generated with OhMyOpenCode assistance
- Add WRAPPING_QUOTES_PATTERN to parse-user-request.ts to strip quotes from plan names
- Add normalizePlanLookupValue() to context-info-builder.ts for slug normalization
- Enhanced findPlanByName() with normalized exact and partial matching
- Allows human-readable plan names (e.g., "my feature plan") to match slugged filenames (e.g., my-feature-plan.md)
🤖 Generated with OhMyOpenCode assistance
CI ubuntu-latest has @types/node ambient types that conflict with
bun-types for CompressionStream/DecompressionStream declarations.
skipLibCheck skips checking .d.ts files from node_modules.
Test expected legacy parenthesized names but display names now use
dash format (Sisyphus - Ultraworker, not Sisyphus (Ultraworker)).
This was the flaky CI failure on dev.
Structured plans (with ## TODOs section) use strict numbered-label
parsing. Simple plans (without sections) fall back to regex checkbox
counting. This fixes 9 test failures from the #3066 merge.
prompt-builder.ts now includes project-level skills from
.opencode/skills/ when building delegated session prompts.
5007 tests pass, tsc clean.
Closes#2687
agent-config-handler.ts now registers custom agents from
~/.config/opencode/agents/ into the task subagent registry.
5005 tests pass, tsc clean.
Closes#2689
handler.ts now catches ContextLengthError/prompt-too-long errors and
stops continuation instead of retrying with an even larger context.
91 tests pass, tsc clean.
Closes#2462
model-selection.ts now separates model selection from variant/reasoning
tier, so agent model overrides don't lock the variant.
34 tests pass, 5009 total, tsc clean.
Closes#3163
Added await for session ready state before sending prompt in
background-agent/manager.ts. Also improved image resizer error handling.
132 tests pass, tsc clean.
Closes#2932
Built-in agents (Sisyphus, Hephaestus, Atlas) now include explicit
identity section in their system prompts, matching custom agent behavior.
12 agent identity tests pass, 266 total pass, tsc clean.
Closes#2964
Added 'trusted' option to expandEnvVars. Skill MCPs are user-controlled
and now bypass the security allowlist. 3 files changed.
TDD verified. tsc clean.
Closes#3168
Changed PACKAGE_NAME from 'oh-my-openagent' to 'oh-my-opencode' in
auto-update-checker/constants.ts to match package.json. This fixes
getCachedVersion() returning null, causing 'unknown' in version toast.
TDD: red-green confirmed. 39 tests pass, tsc clean.
Closes#3129
When Read tool is disabled (attachment mode), the agent prompt now
instructs to analyze the attached content directly instead of
trying to use Read. 3 new tests, 55 total pass.
Closes#3033
All 5 continuation paths now send variant as top-level body field:
- boulder-continuation-injector.ts
- ralph-loop/continuation-prompt-injector.ts
- todo-continuation-enforcer/continuation-injection.ts
- unstable-agent-babysitter-hook.ts
- session-recovery/resume.ts
Plus type/helper updates in atlas, todo-continuation-enforcer,
unstable-agent-babysitter, and session-recovery.
TDD: 18 regression tests added, all pass. tsc clean.
Windows editors often save UTF-8 files with a BOM (Byte Order Mark: \uFEFF).
When this is present, jsonc-parser reports InvalidSymbol at offset 0 because
the BOM is not valid JSON/JSONC syntax.
This commit strips the BOM before parsing, fixing issues #3164 where Windows
users report their opencode.jsonc file fails to parse even though it appears
to start with a valid '{' character.
Fixes: #3164
Co-authored-by: Jobdori <agent@yeongyu.kim>
When users configure agents.sisyphus-junior.model, category sessions
should use that model without falling back to hardcoded
AGENT_MODEL_REQUIREMENTS. Two leaks existed:
1. Launch-time: category-resolver.ts did not check overrideModel when
deciding whether to use the hardcoded fallbackChain. Fixed by adding
overrideModel to the suppression condition.
2. Runtime retry: model-fallback hook.ts treated undefined fallbackChain
(from setSessionFallbackChain(id, undefined)) as 'no override' and
fell through to AGENT_MODEL_REQUIREMENTS on session.error/status
retry. Fixed by storing explicit empty array and checking .has()
instead of truthiness.
Tests added:
- hook.test.ts: explicit empty session fallback suppresses agent chain
- event.model-fallback-2941.test.ts: session.error does not arm retry
- category-resolver.test.ts: overrideModel suppresses fallbackChain
- tools.test.ts: sisyphusJuniorModel override assertion
Display names with parentheses like 'Atlas (Plan Executor)' cause HTTP
header validation errors in x-opencode-agent-name. This was blocking
Atlas/Prometheus from working via /start-work and auto-retry.
Changes:
- Display names: parens -> dashes ('Atlas - Plan Executor')
- Hooks (start-work, no-hephaestus-non-gpt, no-sisyphus-gpt): use
config keys ('atlas', 'sisyphus', 'hephaestus') for agent API fields
- auto-retry: use config key instead of display name for promptAsync
- agent-override-protection: handle dash-suffix normalization
- Updated all test expectations to match new format
Closes#3138
When weaker models (GLM-5, MiniMax) omit the description parameter on
delegate_task, the tool now auto-generates it from the first 4 words of
the prompt instead of throwing an error.
Changes:
- Schema: description is now optional (tool.schema.string().optional())
- Runtime: auto-generates from prompt when missing/empty/whitespace
- DelegateTaskArgs.description type stays as string (guaranteed by auto-gen)
- Tests: 3 new cases - missing/empty/explicit description handling
- Metadata title set after description resolution (correct ordering)
/start-work is the "execute this plan with atlas" command.
Previously, if the user's current session agent was sisyphus (or any
non-prometheus/non-atlas agent), the hook would keep that agent instead
of switching to atlas. This caused sisyphus to execute the plan.
Fix: unconditionally select atlas (when registered) or sisyphus (fallback).
The current session agent is irrelevant to /start-work's intent.
Adds regression test: running /start-work from a sisyphus session must
always hand off to atlas when atlas is available.