Skip to content

feat: add persistent worker supervision - #14

Merged
wowi42 merged 10 commits into
mainfrom
feat/ui-agent-identity
Sep 22, 2026
Merged

wowi42 merged 10 commits into
mainfrom
feat/ui-agent-identity

Conversation

@Mouhand-Kaddo

Copy link
Copy Markdown
Contributor

Summary

  • add persistent, hierarchical writable and read-only workers with durable sessions, safe inbox delivery, permissions, and capacity limits
  • isolate writable workers in Git worktrees and add review, validation, integration, recovery, and cleanup controls
  • add worker-focused TUI controls, approvals, cost/context status, and agent-facing task guidance
  • harden resume recovery for interrupted root tool calls before notification delivery

Testing

  • uv run ruff check
  • uv run ruff format --check
  • uv run python -m pytest -q (1,690 passed)
  • provider-backed CLI smoke test with an isolated writable worker
  • provider-backed CLI capacity test: 10 concurrent writable workers, 10 parent reviews, clean parent checkout

Every child run now gets a stable run id plus its task description, forwarded
with each progress event. Completed, failed, and cancelled runs append one
bounded agent_run record (answer, prompt, per-tool summaries with caps and
truncation markers) to the parent session, with a tombstone-aware reader.
Direct @agent exchanges persist as activity without entering model history.
The TUI now keeps child-run activity out of the scrollback and in a compact
roster above the composer: per-run number, agent, task description, status
and current action, four rows plus +N more. /runs (picker or number/id) opens
a live detail panel with the tool trail and answer; Escape closes it, draft
and approvals untouched. A finished run leaves one attributed summary line.

Tool output is now scannable: successful results render as ✔ name · first
line (+N lines), failures keep a labelled head of up to ten lines, and every
action line keeps the live ctx/ segment. Completed streamed answers are
rendered as Markdown; the task tool reports its run id so the roster pairs a
finished run with its answer.
FormattedTextControl hashes its fragments when caching content; Rich Text
objects are unhashable, so the first render with a live subagent raised
'cannot use tuple as a dict key'. Convert the roster/detail rows to ANSI
through the console, like the statusline toolbar, and add a render-level
regression test.
# Conflicts:
#	src/lecode/agent/runner.py
#	src/lecode/tui/app.py
#	tests/test_agent_runner.py
# Conflicts:
#	src/lecode/tui/app.py
#	src/lecode/tui/feed.py
@wowi42
wowi42 merged commit 137f81d into main Sep 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants