diff --git a/get-shit-done/workflows/map-codebase.md b/get-shit-done/workflows/map-codebase.md
index 28725aa9..7c0e44bf 100644
--- a/get-shit-done/workflows/map-codebase.md
+++ b/get-shit-done/workflows/map-codebase.md
@@ -85,10 +85,10 @@ Continue to spawn_agents.
Before spawning agents, detect whether the current runtime supports the `Task` tool for subagent delegation.
-**Runtimes with Task tool:** Claude Code, Cursor (native subagent support)
-**Runtimes WITHOUT Task tool:** Antigravity, Gemini CLI, OpenCode, Codex, and others
+**Runtimes with Task tool:** Claude Code, Cursor, OpenCode (native subagent support via `Task` or `task`)
+**Runtimes WITHOUT Task tool:** Antigravity, Gemini CLI, Codex, and others
-**How to detect:** Check if you have access to a `Task` tool. If you do NOT have a `Task` tool (or only have tools like `browser_subagent` which is for web browsing, NOT code analysis):
+**How to detect:** Check if you have access to a `Task` or `task` tool (either casing counts). If you do NOT have a Task/task tool (or only have tools like `browser_subagent` which is for web browsing, NOT code analysis):
→ **Skip `spawn_agents` and `collect_confirmations`** — go directly to `sequential_mapping` instead.
@@ -218,7 +218,7 @@ If any agent failed, note the failure and continue with successful documents.
Continue to verify_output.
-
+
When the `Task` tool is unavailable, perform codebase mapping sequentially in the current context. This replaces `spawn_agents` and `collect_confirmations`.
**IMPORTANT:** Do NOT use `browser_subagent`, `Explore`, or any browser-based tool. Use only file system tools (Read, Bash, Write, Grep, Glob, list_dir, view_file, grep_search, or equivalent tools available in your runtime).
diff --git a/tests/init.test.cjs b/tests/init.test.cjs
index c4f21e11..3622e7a7 100644
--- a/tests/init.test.cjs
+++ b/tests/init.test.cjs
@@ -950,6 +950,19 @@ describe('cmdInitMapCodebase', () => {
assert.deepStrictEqual(output.existing_maps, []);
assert.strictEqual(output.codebase_dir_exists, true);
});
+
+ test('map-codebase workflow lists OpenCode as having Task tool support (#1316)', () => {
+ const workflow = fs.readFileSync(
+ path.join(__dirname, '..', 'get-shit-done', 'workflows', 'map-codebase.md'), 'utf8'
+ );
+ // OpenCode must appear in the "with Task tool" line, not the "WITHOUT" line
+ const withLine = workflow.split('\n').find(l => l.includes('Runtimes with Task tool'));
+ const withoutLine = workflow.split('\n').find(l => l.includes('WITHOUT Task tool'));
+ assert.ok(withLine, 'workflow should have a "Runtimes with Task tool" line');
+ assert.ok(withoutLine, 'workflow should have a "WITHOUT Task tool" line');
+ assert.ok(withLine.includes('OpenCode'), 'OpenCode must be listed under runtimes WITH Task tool');
+ assert.ok(!withoutLine.includes('OpenCode'), 'OpenCode must NOT be listed under runtimes WITHOUT Task tool');
+ });
});
// ─────────────────────────────────────────────────────────────────────────────