Prometheus needs to interview the user interactively, so it can't run as a
background task. Updated Athena's delegation prompt:
- Atlas: still delegates via task tool (autonomous execution)
- Prometheus: outputs structured findings summary and tells the user to
switch to Prometheus agent, which sees the conversation context and
can ask clarifying questions directly
Council members launched as agent='athena' got Athena's system prompt saying
'ALWAYS call athena_council first', plus the tool wasn't denied for bg athena
tasks. Each council member spawned 4 more → exponential explosion (47+ tasks).
Three fixes:
1. Deny athena_council in ATHENA_RESTRICTIONS (agent-tool-restrictions.ts)
- Only affects background athena tasks (task-starter.ts)
- Primary Athena (user-selected) still has access via permission field
2. Session-level dedup guard prevents re-calling while council is running
- If Athena retries during long wait, returns 'already running'
3. Increase wait timeout from 2min to 10min (council members need time
for real code analysis with Read/Grep/LSP)
The old prompt said 'when requiring multi-model analysis' which let Athena
decide to skip the council and do direct analysis herself. Combined with
keyword-detector injecting [search-mode] telling her to 'launch explore
agents and use Grep directly', Athena never called athena_council.
Two fixes:
1. System prompt now unconditionally requires athena_council as FIRST action
- Explicitly prohibits Read/Grep/Glob/LSP/call_omo_agent
- Identity is 'orchestrator, not analyst'
2. keyword-detector skips ALL injections for Athena agent
- search/analyze/ultrawork modes conflict with council orchestration
- Same pattern as isPlannerAgent() skip for Prometheus
- Build pure prompt constructors with confirmed finding context and agreement levels
- Add BDD tests for fix/planning intent, question context, and single-finding edge cases
- implement createAthenaAgent with primary-mode model behavior and prompt metadata
- export Athena factory and metadata through athena and root agent barrels
- Add synthesis result contracts with agreement, provenance, and Athena assessment fields\n- Add synthesis prompt builder and council-response formatter with failure-aware provenance output
- Cover completed, partial failure, total failure, and custom member naming scenarios\n- Assert provenance fields and response/error rendering requirements
- Implement executeCouncil with parallel member launch and partial-failure tolerance
- Add result collection mapping and wire Athena exports with read-only athena tool restrictions
- Add BDD coverage for parallel launch, partial failures, and invalid model handling
- Verify shared council prompt/model parsing inputs and per-member passthrough fields
- Add council execution result and member response types for orchestration
- Implement provider/model parser for BackgroundManager-compatible model input
- Add shared council prompt builder and export new athena modules
- Cover standard provider/model strings for supported council members
- Validate edge case handling for model IDs with extra slashes
- Assert null output for malformed parser inputs
- add AthenaOverrideConfigSchema so athena supports council plus standard override fields
- export athena schema/contracts and add root config tests for valid and invalid athena overrides
- switch schema generation to zod v4 toJSONSchema and regenerate JSON schema with athena council structure
- add athena to built-in and overridable agent name schemas
- extend BuiltinAgentName with athena for config-level recognition
- make builtin agent source maps partial until athena runtime registration lands
- Add Athena council config interfaces and execution status types
- Add standalone Zod schemas for council member, council, and top-level Athena config
- Enforce 2-member minimum and bounded optional temperature validation
- Add BDD coverage for valid and invalid Athena council configs
- Include inference and optional-field behavior assertions for CouncilMemberSchema
- Keep RED phase failing until schema implementation is added
- Replace regex /^([A-Za-z_]+)#.../ with indexOf-based prefix check to catch
line-ref#VK and line.ref#VK style inputs that were previously giving generic errors
- Extract parseLineRefWithHint helper to eliminate duplicated try-catch in
validateLineRef and validateLineRefs
- Restore idempotency guard in appendWriteHashlineOutput using new output format
- Add tests for LINE42 extraction, line-ref hint, line.ref hint, and guard behavior
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Replace full hashlined file content in write tool response with a simple
'File written successfully. N lines written.' summary to reduce context
bloat.
- Detect non-numeric prefixes (e.g., "LINE#HK", "POS#VK") and explain
that the prefix must be an actual line number, not literal text
- Add suggestLineForHash() that reverse-looks up a hash in file lines
to suggest the correct reference (e.g., Did you mean "1#HK"?)
- Unify error message format from "LINE#ID" to "{line_number}#{hash_id}"
matching the tool description convention
- Add 3 tests covering non-numeric prefix detection and hash suggestion
applySetLine, applyReplaceLines, applyInsertAfter, applyInsertBefore
were re-exported from both edit-operations.ts and index.ts but have no
external consumers — they are only used internally within the module.
Only applyHashlineEdits (the public API) remains exported.
Remove the old LINE:HEX (e.g. "42:ab") reference format support. All
refs now use LINE#ID format exclusively (e.g. "42#VK"). Also fixes
HASHLINE_OUTPUT_PATTERN to use | separator (was missed in PR #2079).
This function is no longer called from edit-operations.ts after the
op/pos/end/lines schema refactor in PR #2079. Remove the function
definition and its 3 dedicated test cases.
restoreIndentForPairedReplacement() and restoreLeadingIndent() unconditionally
restored original indentation when replacement had none, preventing intentional
indentation changes (e.g. removing a tab from '\t1절' to '1절'). Skip indent
restoration when trimmed content is identical, indicating a whitespace-only edit.
Change LINE#HASH:content format to LINE#HASH|content across the entire
codebase. The pipe separator is more visually distinct and avoids
conflicts with TypeScript colons in code content.
15 files updated: implementation, prompts, tests, and READMEs.
OpenCode updated its read tool output format — the <content> tag now shares
a line with the first content line (<content>1: content) with no newline.
The hook's exact indexOf('<content>') detection returned -1, causing all
read output to pass through unmodified (no hash anchors). This silently
disabled the entire hashline-edit workflow.
Fixes:
- Sub-bug 1: Use findIndex + startsWith instead of exact indexOf match
- Sub-bug 2: Extract inline content after <content> prefix as first line
- Sub-bug 3: Normalize open-tag line to bare tag in output (no duplicate)
Also adds backward compat for legacy <file> + 00001| pipe format.
Unify internal hashline edit handling around replace/append/prepend to remove legacy operation shapes. This keeps normalization, ordering, deduplication, execution, and tests aligned with the new op/pos/end/lines contract.