consciousness/src/subconscious
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
..
agents agent: phase-aware bail script for surface-observe concurrency 2026-04-16 15:41:28 -04:00
daemon.rs migrate more files to use index-based node access 2026-04-13 19:37:11 -04:00
defs.rs Simplify context config: personality_nodes and agent_nodes 2026-04-15 02:37:49 -04:00
digest.rs Remove .md suffix stripping from key lookups 2026-04-15 02:08:35 -04:00
learn.rs learn: skip empty responses; show prior conversation context on F6 2026-04-16 13:20:03 -04:00
mod.rs more dead code deletion 2026-04-12 02:27:05 -04:00
prompts.rs migrate more files to use index-based node access 2026-04-13 19:37:11 -04:00