This repository has been archived on 2026-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
ollie-core/pkg/agent
Levi Neely ed62caced5 agent: serialize Submit with submitMu to prevent command/turn races
Commands like /compact arriving via ctl and prompts arriving via prompt
both call Core.Submit in separate goroutines. handleCommand for mutating
commands (compact, clear, agent, backend) modifies session state without
setting currentAction, so IsRunning() returns false and a concurrent
executeTurn can race.

Add submitMu held during the serialized path of Submit. The fast path
(inject/FIFO push while running) remains lock-free.

Also fix pre-existing race in TestSessionFileStoreWritePrompt: replace
time.Sleep synchronization with a channel signal.
2026-04-26 19:40:06 +02:00
..
commands.go remove built-in SYSTEM_PROMPT.md loading 2026-04-26 15:10:05 +02:00
core.go agent: serialize Submit with submitMu to prevent command/turn races 2026-04-26 19:40:06 +02:00
core_test.go remove built-in SYSTEM_PROMPT.md loading 2026-04-26 15:10:05 +02:00
fifo_test.go agent: add PromptFIFO unit tests 2026-04-11 10:03:47 +02:00
hooks.go agent: add preTool and postTool hooks 2026-04-26 07:19:35 +02:00
loop.go agent: save session after each tool round for mid-turn crash recovery 2026-04-26 19:24:28 +02:00
prompt_resolver.go config: make prompt executable (string or []string of commands) 2026-04-26 15:00:33 +02:00
session.go agent: drop error return from Session.update 2026-04-26 18:56:58 +02:00
state.go agent: drop error return from Session.update 2026-04-26 18:56:58 +02:00
types.go remove MCP support, add execute_code tests 2026-04-21 13:25:32 +02:00
waitchange_test.go agent: refactor prompt architecture and session lifecycle 2026-04-25 19:38:18 +02:00