consciousness/src
Kent Overstreet 0e6b5dc8be agent: phase-aware bail script for surface-observe concurrency
bail-no-competing.sh used to bail if any other live agent existed in
the state dir, period. That was too coarse: surface-observe agents run
a multi-step pipeline (surface → organize-search → organize-new →
observe), and the intent is to let a new surface-phase agent start
while an older one finishes its post-surface tail. With the old check
the newer agent always bailed, so surface-observe was effectively
serialized at the slowest cycle time.

Make the script phase-aware:

- oneshot.rs now passes the current phase as argv[2] alongside the pid
  file name. The script writes that phase into its own pid file on
  every step transition, so concurrent agents can read each other's
  phase just by cat'ing the pid files.

- Bail only when another live agent is in the same phase-group as us.
  Groups: "surface" vs. "everything else" (post-surface). At most one
  agent per group alive at a time — surface runs at a higher cadence
  than the organize/observe tail.

- Still clean up stale pid files for dead processes.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
2026-04-16 15:41:28 -04:00
..
agent agent: phase-aware bail script for surface-observe concurrency 2026-04-16 15:41:28 -04:00
bin context: tighten timestamp schema; every AstNode has one 2026-04-16 12:35:16 -04:00
cli Simplify context config: personality_nodes and agent_nodes 2026-04-15 02:37:49 -04:00
hippocampus store: add weight to index, index-only key matching 2026-04-15 05:14:04 -04:00
learn rust edition 2024 2026-04-05 06:20:16 -04:00
mind config: global writable AppConfig; learn settings live there 2026-04-16 12:53:22 -04:00
subconscious agent: phase-aware bail script for surface-observe concurrency 2026-04-16 15:41:28 -04:00
thalamus hours_since_last_dream: return 0 if dream in progress 2026-04-15 21:58:03 -04:00
user learn: skip empty responses; show prior conversation context on F6 2026-04-16 13:20:03 -04:00
config.rs config_writer: emit pretty multi-line sections, drop json5 crate 2026-04-16 13:08:19 -04:00
config_writer.rs config_writer: emit pretty multi-line sections, drop json5 crate 2026-04-16 13:08:19 -04:00
lib.rs config_writer: json5 round-trip editing via json-five 2026-04-16 11:48:47 -04:00
locks.rs locks: add process-wide lock hold time tracking 2026-04-12 20:27:42 -04:00
main.rs cli: add 'node restore' command for undeleting nodes 2026-04-15 01:40:29 -04:00
mcp_server.rs memory.rs: clean up store access and tool dispatch 2026-04-13 14:27:38 -04:00
session.rs delete claude code integration 2026-04-09 19:58:07 -04:00
util.rs delete 20 dead public functions across 12 files 2026-04-02 16:21:01 -04:00