Skip to content

feat: run the main thread as a native Claude session under Herdr - #69

Merged
oldsj merged 8 commits into
mainfrom
remote-agent-workspaces-r3-d
Sep 20, 2026
Merged

oldsj merged 8 commits into
mainfrom
remote-agent-workspaces-r3-d

Conversation

@oldsj

@oldsj oldsj commented Sep 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • Native agent sessions under Herdr (delivery ledger, journal mirror, resume) and, on top, the r7 context model: a main-thread window owned by Mainloop through rotation, topics, a token-scoped mainloop CLI with server-side policy, and topic-tagged delegation to a child agent whose report returns to the main thread.
  • Status is answered from Postgres and adds no native turn.
  • Behind MAIN_THREAD_MODE=native; the SDK chat path is unchanged and remains the default.

Scope and caveats

  • Local-kind only. k8s/apps/mainloop/overlays/spike-herdr and spikes/ are local exceptions to GitOps; trunk checkov/trivy ignores extended to spikes/** for that reason.
  • Proved live with real Claude and Codex on the local cluster (main thread, delegation and report, status without a native turn, pod replacement and resume, rotation, policy refusals). Depth refusal is covered by fakes only. Default tests use fakes (105 pass).
  • Known gap: the per-binding token scopes the CLI but is not a security boundary while the rest of the backend API is unauthenticated and reachable from the pods. API authentication is a required follow-up before any non-local use.
  • Not built: topic supervisors, per-child turn budgets, recovery of queued deliveries after a backend restart.

Specs: docs/specs/chat.md, docs/specs/sessions.md; measurements and open items: docs/spikes/native-main-thread-context.md.

🤖 Generated with Claude Code

oldsj and others added 8 commits September 19, 2026 21:41
Adds native agent sessions under Herdr (delivery ledger, journal mirror,
resume) and the context model on top: main-thread window owned by
rotation, topics, a token-scoped `mainloop` CLI with server-side policy,
and topic-tagged delegation to a child agent whose report returns to the
main thread. Status is answered from Postgres and adds no native turns.

Behind MAIN_THREAD_MODE=native; the SDK chat path is unchanged and stays
the default. Local-kind only: the spike-herdr overlay and spikes/ are
local exceptions to GitOps. Known gap: the per-binding token is not a
security boundary while the rest of the backend API is unauthenticated.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Lint failed on every run with HTTP 404 fetching trivy v0.68.2.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@oldsj
oldsj merged commit c3f0d6b into main Sep 20, 2026
5 of 6 checks passed
@oldsj
oldsj deleted the remote-agent-workspaces-r3-d branch September 20, 2026 18:39
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.

1 participant