[limen LIMEN-003] Open Codex task one - #28
Conversation
limen task LIMEN-003
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdjusts agent dispatch resolution to prefer an environment-configured dispatch command before local agents, and simplifies the default external dispatcher to a fixed Flow diagram for updated agent dispatch resolution orderflowchart TD
A[call_agent_dispatch] --> B{agent == jules}
B -- yes --> C[_call_jules]
B -- no --> D{LIMEN_DISPATCH_CMD set}
D -- yes --> E[_build_prompt]
E --> F[_run_cmd with env dispatch_cmd]
D -- no --> G{agent in _LOCAL_AGENTS}
G -- yes --> H[_call_local_agent]
G -- no --> I[set dispatch_cmd to agent-dispatch]
I --> J[_build_prompt]
J --> K[_run_cmd with agent-dispatch]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The new
LIMEN_DISPATCH_CMDhandling changes the dispatch precedence (env-based command now runs before_LOCAL_AGENTS), which may surprise existing users; consider preserving the previous order or documenting the behavioral change explicitly in code comments. - The prompt/cmd construction logic is now duplicated in two branches; consider refactoring into a shared helper to avoid divergence if the command format needs to change later.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The new `LIMEN_DISPATCH_CMD` handling changes the dispatch precedence (env-based command now runs before `_LOCAL_AGENTS`), which may surprise existing users; consider preserving the previous order or documenting the behavioral change explicitly in code comments.
- The prompt/cmd construction logic is now duplicated in two branches; consider refactoring into a shared helper to avoid divergence if the command format needs to change later.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.
Code Review
This pull request modifies the call_agent_dispatch function in cli/src/limen/dispatch.py to check and execute a custom dispatch command from the environment before checking if the agent is a local agent. The reviewer correctly pointed out that this change allows local agents to bypass the local agent execution path when LIMEN_DISPATCH_CMD is set, which skips critical worktree isolation and git branching logic, violating the repository's Worktree Isolation protocol. The reviewer suggested prioritizing the local agent check before handling the fallback dispatch command.
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) | ||
| 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") | ||
|
|
||
| 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.
Checking LIMEN_DISPATCH_CMD and executing it before checking if agent in _LOCAL_AGENTS: causes any local agent (such as codex, opencode, or claude) to bypass _call_local_agent entirely when LIMEN_DISPATCH_CMD is set in the environment. This skips the worktree isolation, git branching, and PR creation logic defined in _isolated_local_run, which directly violates the repository's Worktree Isolation protocol.
To resolve this, prioritize the local agent check before handling the fallback dispatch command.
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
- The repository style guide specifies that the Conductor Swarm must spawn tasks in isolated git worktrees (Worktree Isolation protocol) to prevent parallel tasks from conflicting in the shared working directory. (link)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e5b88116b6
ℹ️ 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".
| dispatch_cmd = os.environ.get("LIMEN_DISPATCH_CMD") | ||
| if dispatch_cmd: | ||
| prompt = _build_prompt(task) | ||
| cmd = [dispatch_cmd, agent, prompt] | ||
| return _run_cmd(cmd, task, dry_run) |
There was a problem hiding this comment.
Preserve isolated dispatch for local agents
When LIMEN_DISPATCH_CMD is set, this branch now catches codex, opencode, claude, etc. before agent in _LOCAL_AGENTS, so live local dispatch skips _call_local_agent() and therefore bypasses the worktree/branch/commit/push/PR flow documented just below as the universal default for local lanes. In any environment that exports a generic dispatch command, limen dispatch --agent codex --live will mark budget/status as dispatched after that command exits instead of producing the isolated PR artifact that local tasks rely on; the override should apply only to unknown agents or be gated separately from local lanes.
Useful? React with 👍 / 👎.
…istry (#248) A his-hand task must never live only in a chat closeout or one repo's issue comments — it hangs in his-hand-levers.json (git, durable), which obligations-view.py unions onto the obligations face. Two edu atoms surfaced this session were homed only as edu-organism issue comments; register them: - L-ENC1102-GRADEBOOK (#18): pick the D2L gradebook weighting path (per-category vs flat; the choice turns on Broward's master) then key it in. Reconciliation fully worked at edu-organism courses/enc1102/memory/gradebook-weights.md. - L-EDU-PERTERM (#16, #28): the per-term ritual's two irreducible his-hand points — export the LMS shell + fill ref/section/dates into the term YAML; the engine does the rest. ENC1101 fall-2026.yaml template already staged. Data-only edit; obligations face renders all 15 levers (new two present). Pre-existing E741 in scripts/obligations-view.py is unrelated, ungated, left as-is. Co-authored-by: Test User <test@example.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
|
superseded by #34 (newest dispatch of same fleet task: LIMEN-003) |
- 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>
Autonomous limen dispatch of task
LIMEN-003.Produced in an isolated worktree off origin — review before merge.
Summary by Sourcery
Enhancements: