[limen LIMEN-004] Open Codex task two - #29
Conversation
limen task LIMEN-004
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds support for a custom LIMEN_DISPATCH_CMD environment variable that, when set, is used directly for non-jules agents before falling back to local agents or the default 'agent-dispatch' command, slightly reordering the dispatch resolution logic. Flow diagram for updated call_agent_dispatch logicflowchart TD
start([call_agent_dispatch])
jules{agent == 'jules'}
env{LIMEN_DISPATCH_CMD is set}
local{agent in _LOCAL_AGENTS}
default_cmd([Use 'agent-dispatch'])
run_env([Run _run_cmd with LIMEN_DISPATCH_CMD])
run_local([Call _call_local_agent])
run_jules([Call _call_jules])
start --> jules
jules -->|yes| run_jules
jules -->|no| env
env -->|yes| run_env
env -->|no| local
local -->|yes| run_local
local -->|no| default_cmd
default_cmd --> run_env
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Code Review
This pull request modifies the agent dispatch logic in cli/src/limen/dispatch.py by checking and executing LIMEN_DISPATCH_CMD before verifying if the agent is a local agent. However, this change bypasses the local agent check, which violates the Worktree Isolation protocol. It is recommended to restore the _LOCAL_AGENTS check before applying LIMEN_DISPATCH_CMD to ensure local agents run in isolated git worktrees.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| dispatch_cmd = os.environ.get("LIMEN_DISPATCH_CMD") | ||
| if dispatch_cmd: | ||
| prompt = _build_prompt(task) | ||
| return _run_cmd([dispatch_cmd, agent, prompt], task, dry_run) | ||
| if agent in _LOCAL_AGENTS: | ||
| return _call_local_agent(agent, task, dry_run) | ||
| dispatch_cmd = os.environ.get("LIMEN_DISPATCH_CMD", "agent-dispatch") | ||
| dispatch_cmd = "agent-dispatch" | ||
| prompt = _build_prompt(task) | ||
| cmd = [dispatch_cmd, agent, prompt] | ||
| return _run_cmd(cmd, task, dry_run) |
There was a problem hiding this comment.
Bypassing the _LOCAL_AGENTS check when LIMEN_DISPATCH_CMD is set violates the Worktree Isolation protocol. Local agents (such as codex, opencode, etc.) must run in isolated git worktrees via _call_local_agent to prevent parallel task conflicts in the shared working directory. Checking LIMEN_DISPATCH_CMD first completely bypasses this isolation.
Please restore the check for _LOCAL_AGENTS before checking or applying LIMEN_DISPATCH_CMD.
| dispatch_cmd = os.environ.get("LIMEN_DISPATCH_CMD") | |
| if dispatch_cmd: | |
| prompt = _build_prompt(task) | |
| return _run_cmd([dispatch_cmd, agent, prompt], task, dry_run) | |
| if agent in _LOCAL_AGENTS: | |
| return _call_local_agent(agent, task, dry_run) | |
| dispatch_cmd = os.environ.get("LIMEN_DISPATCH_CMD", "agent-dispatch") | |
| dispatch_cmd = "agent-dispatch" | |
| prompt = _build_prompt(task) | |
| cmd = [dispatch_cmd, agent, prompt] | |
| return _run_cmd(cmd, task, dry_run) | |
| if agent in _LOCAL_AGENTS: | |
| return _call_local_agent(agent, task, dry_run) | |
| dispatch_cmd = os.environ.get("LIMEN_DISPATCH_CMD", "agent-dispatch") | |
| prompt = _build_prompt(task) | |
| cmd = [dispatch_cmd, agent, prompt] | |
| return _run_cmd(cmd, task, dry_run) |
References
- Execution Protocols - 1. Worktree Isolation: Instead of cloning or checking out branches in the main repository checkout, the Conductor Swarm MUST spawn tasks in isolated git worktrees. (link)
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The new ordering means
LIMEN_DISPATCH_CMDis now used for agents in_LOCAL_AGENTSinstead of_call_local_agent, which changes behavior; consider whether local agents should still bypass external dispatch and, if so, move the_LOCAL_AGENTScheck before theLIMEN_DISPATCH_CMDbranch. - You now build the prompt twice along different branches; consider refactoring to compute
prompt = _build_prompt(task)once before the dispatch command selection to avoid duplication.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The new ordering means `LIMEN_DISPATCH_CMD` is now used for agents in `_LOCAL_AGENTS` instead of `_call_local_agent`, which changes behavior; consider whether local agents should still bypass external dispatch and, if so, move the `_LOCAL_AGENTS` check before the `LIMEN_DISPATCH_CMD` branch.
- You now build the prompt twice along different branches; consider refactoring to compute `prompt = _build_prompt(task)` once before the dispatch command selection to avoid duplication.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 07550bf03a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if dispatch_cmd: | ||
| prompt = _build_prompt(task) | ||
| return _run_cmd([dispatch_cmd, agent, prompt], task, dry_run) |
There was a problem hiding this comment.
Keep local lanes on the isolated dispatch path
When LIMEN_DISPATCH_CMD is set in an environment that dispatches a local lane, this branch runs before agent in _LOCAL_AGENTS, so codex/opencode/agy/claude no longer reach _isolated_local_run and therefore skip the worktree → commit → push → PR flow used by scripts/metabolize.sh. Any wrapper that exits 0 will still make dispatch_tasks mark the task dispatched and spend budget, but without the promised reviewable PR or live-checkout isolation; please keep local agents on _call_local_agent unless LIMEN_ISOLATION=off is explicitly requested.
Useful? React with 👍 / 👎.
|
superseded by #31 (newest dispatch of same fleet task: LIMEN-004) |
Each owner records its own remaining work (closeout discipline): what landed, the larger media-ark repo effort (red CI issue #5, conflicting PRs #29/#34/#42, undeployed + $0), the Spine-B next slices (real send, media-ark index select, beat wiring), the aspirational vision slices, and the 5 human levers. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
media-ark CI is green on main for the first time (organvm/media-ark#51, merged c28bf83). Update the residual record: correct issue #5's stale runner-pickup theory (real cause was the half-landed #43 auth refactor + a src/platform stdlib-shadow + a broken tox invocation), and log the remaining atoms — 5 superseded dud PRs to close and issue #5 to close (both classifier-gated external writes, one-liners recorded), the 3 CONFLICTING feature PRs (#29/#34/#42), and the src/platform rename as the permanent shadow fix. Co-authored-by: Test User <test@example.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…g / deploy (#519) media-ark PR #52 (9371420) landed the per-user quota/paywall: #29 rebased onto green main with its spoofable X-User-Tier header model reconciled onto the AuthStore bearer identity (tier is ledger-owned). Update organs/media/NEXT.md — mark #29 DONE, fold the close-#29 hygiene atom into the dud-PR one-liner, and scope the two remaining chunks: Phase 2 (wire the paywall to MONETA's offline ECDSA-P256 licence via a pure-stdlib verifier + POST /api/license) and Phase 3 (deploy — owner hosting decision, the true revenue bottleneck). Co-authored-by: Test User <test@example.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- 8 documented-residue (CLASS 1): logs/ or .tmp-* only untracked, HEAD is ancestor of origin/default, unpushed=0 - 8 remote-pr-open (CLASS 2): pushed existing commits, opened draft PRs or captured existing open PR Roots receipted: heal-cifix-organvm-a-i--skills-27-7ed7339a (documented-residue) heal-cifix-organvm-a-i--skills-27-8f4677cb (documented-residue) heal-cifix-organvm-bountyscope-13-c8378dbc (documented-residue) heal-cifix-organvm-growth-auditor-13-8e0b3a07 (documented-residue) heal-cifix-organvm-growth-auditor-13-b800950c (documented-residue) heal-cifix-organvm-growth-auditor-16-aa9e65aa (documented-residue) heal-cifix-organvm-organvm-engine-100-93e5b4a5 (documented-residue) heal-cifix-organvm-organvm-ontologia-11-55899198 (documented-residue) aw-public-face-contribution-balance-3112b780 (remote-pr-open #1056) heal-cifix-organvm-conversation-corpus-engine-42-28f71173 (remote-pr-open #61) heal-cifix-organvm-domus-genoma-136-6a8c088f (remote-pr-open #136 existing) heal-cifix-organvm-growth-auditor-11-171607f7 (remote-pr-open #26) heal-cifix-organvm-growth-auditor-11-ddbe8b4c (remote-pr-open #27) heal-cifix-organvm-growth-auditor-12-18efdd4f (remote-pr-open #28) heal-cifix-organvm-growth-auditor-13-1d41d80b (remote-pr-open #29) heal-cifix-organvm-growth-auditor-13-bc0b11cc (remote-pr-open #30) Campaign: #685 Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…ark atoms operator-cleared (#1100) Ports the single unique commit preserved from the feat-gcp-sa-organ worktree (PR #544 merged through f20bb66; local HEAD 0a4f21f held only this one-file owner-record update). Marks the media-ark superseded-PR closes (#44/#45/#46/#48/#49/#29) and issue #5 close DONE (operator cleared in-session, 2026-07-01). Resolves row feat-gcp-sa-organ (owner_commit_needs_packet) of prompt-batch-critical-owner-blocker-001. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Autonomous limen dispatch of task
LIMEN-004.Produced in an isolated worktree off origin — review before merge.
Summary by Sourcery
Enhancements: