Skip to content

[limen LIMEN-003] Open Codex task one - #28

Closed
4444J99 wants to merge 1 commit into
mainfrom
limen/limen-003-aea4
Closed

[limen LIMEN-003] Open Codex task one#28
4444J99 wants to merge 1 commit into
mainfrom
limen/limen-003-aea4

Conversation

@4444J99

@4444J99 4444J99 commented Jun 18, 2026

Copy link
Copy Markdown
Owner

Autonomous limen dispatch of task LIMEN-003.

Produced in an isolated worktree off origin — review before merge.

Summary by Sourcery

Enhancements:

  • Add support for LIMEN_DISPATCH_CMD environment variable to specify a custom dispatch command, with fallback to the default agent-dispatch binary.

limen task LIMEN-003
@sourcery-ai

sourcery-ai Bot commented Jun 18, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adjusts agent dispatch resolution to prefer an environment-configured dispatch command before local agents, and simplifies the default external dispatcher to a fixed agent-dispatch when no override is set.

Flow diagram for updated agent dispatch resolution order

flowchart 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]
Loading

File-Level Changes

Change Details Files
Change dispatch resolution order and environment override behavior when calling non-jules agents.
  • Introduce an early check for the LIMEN_DISPATCH_CMD environment variable for all non-jules agents, using it to run the external dispatcher if set.
  • Only fall back to local agent invocation (_LOCAL_AGENTS) when no environment override dispatch command is configured.
  • Simplify the default dispatch command to a hard-coded agent-dispatch string instead of reading LIMEN_DISPATCH_CMD with a default value, clarifying the precedence between environment override and default behavior.
cli/src/limen/dispatch.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • 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.
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.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread cli/src/limen/dispatch.py
Comment on lines +29 to 41
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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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
  1. 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)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread cli/src/limen/dispatch.py
Comment on lines +29 to +33
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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

4444J99 added a commit that referenced this pull request Jun 25, 2026
…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>
@4444J99

4444J99 commented Jun 25, 2026

Copy link
Copy Markdown
Owner Author

superseded by #34 (newest dispatch of same fleet task: LIMEN-003)

@4444J99 4444J99 closed this Jun 25, 2026
@4444J99
4444J99 deleted the limen/limen-003-aea4 branch June 27, 2026 02:15
4444J99 added a commit that referenced this pull request Jul 14, 2026
- 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>
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