fix: list OpenCode as runtime with Task tool support in map-codebase
OpenCode has a `task` tool that supports spawning subagents, but map-codebase workflow incorrectly listed it under "Runtimes WITHOUT Task tool". This caused the agent to skip parallel mapping and fall back to sequential mode, wasting tokens when it self-corrected. Move OpenCode to the "with Task tool" list and clarify that either `Task` or `task` (case-insensitive) qualifies. Add regression test. Fixes #1316 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
// ─────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user