Repository navigation
feat(backends): add Paseo runtime backend - #5
Merged
Merged
Conversation
…unused capture helper
…x gating and rejected native error as idle
…ted the bootstrap test’s accepted-backend list. The focused watcher regression, full bootstrap suite, `bin/fm-lint.sh --partition 1of2`, and `git diff --check` pass. CI Lint 1 ended with signal 143 and no lint diagnostic; the local partition completed cleanly
…nd-paseo.test.sh](/home/rgm/.no-mistakes/worktrees/ff5e17b6f5de/01M3JQ3ZH38JJ7KE1SMNRKFBSK/tests/fm-backend-paseo.test.sh:4) and removing the unused `dirty` parameter from [fm-spawn-paseo-env.test.sh](/home/rgm/.no-mistakes/worktrees/ff5e17b6f5de/01M3JQ3ZH38JJ7KE1SMNRKFBSK/tests/fm-spawn-paseo-env.test.sh:71) and its seven calls. `bin/fm-lint.sh --partition 2of2`, both Paseo tests, the board-render test, the full bearings snapshot test, and `git diff --check` passed. CI’s behavior failure was the board-render test reporting no live listener owner after reconciliation; the targeted rerun and full snapshot suite pass locally, and the relevant board/process-event code is unchanged in this PR, so that finding did not warrant a code change
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Continue delivering the Paseo runtime backend adapter for firstmate (the existing PR is #1): a new backend adapter that lets firstmate dispatch and supervise crewmates through the Paseo agent-orchestration platform (bin/backends/paseo.sh), including spawn, status, control, teardown, and launch-environment handling. The previous validation run on the existing branch crashed and left the pipeline unable to reconcile or start any new run against that branch name, with no supported non-destructive recovery path found. The captain authorized rebuilding the already-reviewed implementation onto a fresh branch name in a new worker on the Herdr runtime instead of continuing to fight the stuck branch. Preserve the existing PR when the delivery path allows retargeting it to the new branch; otherwise open a new PR and report the exact outcome plainly.
Also apply two corrections already decided: (1) launch the Paseo CLI with each allowlisted environment value passed directly as its own
--env NAME=valuepair instead of the previous approach of writing a private file and passing only--env BASH_ENV=<path>, because the Paseo-launched provider process never goes through a bash shell that would sourceBASH_ENV, so that file was never actually reaching the provider; document in docs/paseo-backend.md and docs/configuration.md that on the Paseo backend, allowlisted launch values are passed via Paseo's--envflag and are therefore visible in process listings on the host running the Paseo daemon. (2) Remove the unconditional--mode auto-reviewcase hardcoded for the codex provider in bin/backends/paseo.sh; leave the opencode--mode buildcase untouched.What Changed
--env NAME=valuearguments and document their visibility in daemon-host process listings. Keep OpenCode’s--mode buildand leave Codex without a forced mode.Risk Assessment
🚨 High: The change has a deterministic relaunch failure, can discard work during rollback, and introduces security and environment-handling defects on supported launch paths.
Testing
Paseo 0.9.2's real adapter preflight reached daemon 0.9.1; focused stub-backed adapter, spawn-environment/abort, and control checks passed, and the required launch-environment documentation was reviewed. No live agent scenarios were run because only the shared user-home daemon was configured and no isolated test credentials were available. The worktree remained clean.
--envand Codex receives no forced auto-review mode..env; Firstmate retains it and reports both IDs and the reason.Evidence: Live Paseo adapter readiness
Source: Live Paseo adapter readiness
adapter_runtime_check=ready paseo_cli=0.9.2 daemonVersion: 0.9.1 connectedDaemon: reachablePipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
🔧 **Rebase** - 1 issue found → auto-fixed ✅
bin/fm-spawn.sh- merge conflict rebasing onto origin/main🔧 Fix applied.
✅ Re-checked - no issues remain.
bin/backends/paseo.sh:108- A Paseo relaunch passes the existing workspace at lines 74–76, but the CLI reportsUsing workspace <id>and its run result has noworkspaceId; neither parser branch here recovers that ID, so line 111 fails after creating the replacement agent.fm-spawn.sh:2973,2983only arms cleanup after this function returns successfully, leaving the new agent untracked while relaunch fails. Use the suppliedworkspace_idwhen reusing a workspace. Paseo run workspace resolution and result shapebin/fm-spawn.sh:1239- After Paseo returns,PASEO_DIRECTstays set until metadata and backlog publication complete (fm-spawn.sh:2983,5165); any earlier failure runs the EXIT cleanup atfm-spawn.sh:1237-1239, which archives the agent and workspace without checking for edits. The brief has already been sent atfm-spawn.sh:2973, and archiving the final workspace reference removes its managed worktree. Conversely, ifpaseo runreturns nonzero after creating the workspace but before creating the agent, this adapter returns at line 105 without capturing or cleaning up that workspace; the CLI creates the workspace before attempting agent creation. The missing policy decision is whether partially started work should be retained/reconciled or discarded; changing that recovery and retention behavior needs authorization. Paseo workspace creation order, workspace archive behaviorbin/fm-spawn.sh:2985- Paseo receivesGOTMPDIR=/tmp/fm-$ID/gotmpatfm-spawn.sh:2949, but thismkdir -preuses a preexisting path without checking for symlinks, ownership, or writable-by-others permissions. A local user can precreate/tmp/fm-$IDas a symlink to a writable directory, causing provider scratch writes to land there. The private-root checks atfm-spawn.sh:4178-4187are skipped by the enclosingBACKEND != paseoguard at line 4118; apply that validation to the Paseo path too.bin/fm-spawn.sh:2956- This contradicts the required criterion: “each allowlisted environment value is passed directly as its own--env NAME=valuepair.” The project supports stock macOS Bash 3.2, but[ -v "$paseo_env_name" ]uses a test operator added in Bash 4.2; under 3.2 the test errors and|| continuesilently skips every allowlisted value. Use a Bash 3.2-compatible unset check. GNU Bash 4.2 release noticebin/fm-spawn.sh:2963- Allowlisted names are appended after the fixed worker values, and Paseo processes repeated--envkeys in order with the last value winning. For example, if the allowlist containsCOMPACT_ADVISER_DISABLEand Firstmate inherits0, the worker receives0despite the documented guarantee that this remains1. The same collision applies toFM_TASK_ID,FIRSTMATE_HOME,FIRSTMATE_STATE,FM_TURNEND, andGOTMPDIRfrom lines 2945–2950. Reject these reserved names or ensure Firstmate's values win. Paseo repeated environment parsing, configuration guaranteebin/backends/paseo.sh:83- Iforigin/HEADis absent or stale, this fallback selects a localmainormasterbranch before checking other refs. The Paseo path skips Firstmate's fresh-base step atfm-spawn.sh:4114-4115; with a stale localmain, a fresh task therefore starts from old code even though Paseo fetches remote refs. Prefer the current remote default ref before falling back to local branches. Paseo worktree base guidancebin/fm-control.sh:427-wait_paseo_statusreturns success for any nonempty status, then relaunch marks the agent confirmed and printsrelaunched. Paseo exposeserrorandclosedstatuses, so a replacement that immediately enterserroris reported as successfully relaunched. Treat failure or closed states as unsuccessful readiness. Paseo lifecycle statuses🔧 Fix applied.
10 issues (6 errors, 4 warnings) still open:
bin/backends/paseo.sh:108- A Paseo relaunch passes the existing workspace at lines 74–76, but the CLI reportsUsing workspace <id>and its run result has noworkspaceId; neither parser branch here recovers that ID, so line 111 fails after creating the replacement agent.fm-spawn.sh:2973,2983only arms cleanup after this function returns successfully, leaving the new agent untracked while relaunch fails. Use the suppliedworkspace_idwhen reusing a workspace. Paseo run workspace resolution and result shapebin/fm-spawn.sh:1239- After Paseo returns,PASEO_DIRECTstays set until metadata and backlog publication complete (fm-spawn.sh:2983,5165); any earlier failure runs the EXIT cleanup atfm-spawn.sh:1237-1239, which archives the agent and workspace without checking for edits. The brief has already been sent atfm-spawn.sh:2973, and archiving the final workspace reference removes its managed worktree. Conversely, ifpaseo runreturns nonzero after creating the workspace but before creating the agent, this adapter returns at line 105 without capturing or cleaning up that workspace; the CLI creates the workspace before attempting agent creation. The missing policy decision is whether partially started work should be retained/reconciled or discarded; changing that recovery and retention behavior needs authorization. Paseo workspace creation order, workspace archive behaviorbin/fm-spawn.sh:2985- Paseo receivesGOTMPDIR=/tmp/fm-$ID/gotmpatfm-spawn.sh:2949, but thismkdir -preuses a preexisting path without checking for symlinks, ownership, or writable-by-others permissions. A local user can precreate/tmp/fm-$IDas a symlink to a writable directory, causing provider scratch writes to land there. The private-root checks atfm-spawn.sh:4178-4187are skipped by the enclosingBACKEND != paseoguard at line 4118; apply that validation to the Paseo path too.bin/fm-spawn.sh:2956- This contradicts the required criterion: “each allowlisted environment value is passed directly as its own--env NAME=valuepair.” The project supports stock macOS Bash 3.2, but[ -v "$paseo_env_name" ]uses a test operator added in Bash 4.2; under 3.2 the test errors and|| continuesilently skips every allowlisted value. Use a Bash 3.2-compatible unset check. GNU Bash 4.2 release noticebin/fm-spawn.sh:2963- Allowlisted names are appended after the fixed worker values, and Paseo processes repeated--envkeys in order with the last value winning. For example, if the allowlist containsCOMPACT_ADVISER_DISABLEand Firstmate inherits0, the worker receives0despite the documented guarantee that this remains1. The same collision applies toFM_TASK_ID,FIRSTMATE_HOME,FIRSTMATE_STATE,FM_TURNEND, andGOTMPDIRfrom lines 2945–2950. Reject these reserved names or ensure Firstmate's values win. Paseo repeated environment parsing, configuration guaranteebin/backends/paseo.sh:83- Iforigin/HEADis absent or stale, this fallback selects a localmainormasterbranch before checking other refs. The Paseo path skips Firstmate's fresh-base step atfm-spawn.sh:4114-4115; with a stale localmain, a fresh task therefore starts from old code even though Paseo fetches remote refs. Prefer the current remote default ref before falling back to local branches. Paseo worktree base guidancebin/fm-control.sh:427-wait_paseo_statusreturns success for any nonempty status, then relaunch marks the agent confirmed and printsrelaunched. Paseo exposeserrorandclosedstatuses, so a replacement that immediately enterserroris reported as successfully relaunched. Treat failure or closed states as unsuccessful readiness. Paseo lifecycle statusesbin/backends/paseo.sh:122-paseo logsprints a formatted transcript, not JSON; the official logs implementation callsconsole.log, sojqfails on real output. The new capture route atbin/fm-backend.sh:752exposes this to all capture callers, andbin/fm-watch.sh:2725-2732then skips text-based stale detection for Paseo agents. The mock attests/fm-backend-paseo.test.sh:35-37returns JSON and masks the mismatch. Consume the transcript format the CLI actually emits.bin/fm-spawn.sh:2954- This conflicts with the required criterion: “each allowlisted environment value passed directly as its own--env NAME=valuepair.” A valid allowlist containingPASEO_AGENT_IDis silently skipped here; the same invariant is also blocked when a set value contains CR/LF atbin/fm-spawn.sh:2958-2961, which aborts the spawn. The Bash 3.2 forwarding fix round changed the unset check but left these exclusions in place. Confirm whether these values must be forwarded or whether the intent should specify these exceptions.docs/paseo-backend.md:24- The new guide says on line 22 that liveness is unverified because Paseo exposes no worker PID, then repeats the same limitation here. No intent requirement needs both statements; remove this duplicate sentence.🔧 Fix applied.
10 issues (6 errors, 4 warnings) still open:
bin/backends/paseo.sh:108- A Paseo relaunch passes the existing workspace at lines 74–76, but the CLI reportsUsing workspace <id>and its run result has noworkspaceId; neither parser branch here recovers that ID, so line 111 fails after creating the replacement agent.fm-spawn.sh:2973,2983only arms cleanup after this function returns successfully, leaving the new agent untracked while relaunch fails. Use the suppliedworkspace_idwhen reusing a workspace. Paseo run workspace resolution and result shapebin/fm-spawn.sh:1239- After Paseo returns,PASEO_DIRECTstays set until metadata and backlog publication complete (fm-spawn.sh:2983,5165); any earlier failure runs the EXIT cleanup atfm-spawn.sh:1237-1239, which archives the agent and workspace without checking for edits. The brief has already been sent atfm-spawn.sh:2973, and archiving the final workspace reference removes its managed worktree. Conversely, ifpaseo runreturns nonzero after creating the workspace but before creating the agent, this adapter returns at line 105 without capturing or cleaning up that workspace; the CLI creates the workspace before attempting agent creation. The missing policy decision is whether partially started work should be retained/reconciled or discarded; changing that recovery and retention behavior needs authorization. Paseo workspace creation order, workspace archive behaviorbin/fm-spawn.sh:2985- Paseo receivesGOTMPDIR=/tmp/fm-$ID/gotmpatfm-spawn.sh:2949, but thismkdir -preuses a preexisting path without checking for symlinks, ownership, or writable-by-others permissions. A local user can precreate/tmp/fm-$IDas a symlink to a writable directory, causing provider scratch writes to land there. The private-root checks atfm-spawn.sh:4178-4187are skipped by the enclosingBACKEND != paseoguard at line 4118; apply that validation to the Paseo path too.bin/fm-spawn.sh:2956- This contradicts the required criterion: “each allowlisted environment value is passed directly as its own--env NAME=valuepair.” The project supports stock macOS Bash 3.2, but[ -v "$paseo_env_name" ]uses a test operator added in Bash 4.2; under 3.2 the test errors and|| continuesilently skips every allowlisted value. Use a Bash 3.2-compatible unset check. GNU Bash 4.2 release noticebin/fm-spawn.sh:2963- Allowlisted names are appended after the fixed worker values, and Paseo processes repeated--envkeys in order with the last value winning. For example, if the allowlist containsCOMPACT_ADVISER_DISABLEand Firstmate inherits0, the worker receives0despite the documented guarantee that this remains1. The same collision applies toFM_TASK_ID,FIRSTMATE_HOME,FIRSTMATE_STATE,FM_TURNEND, andGOTMPDIRfrom lines 2945–2950. Reject these reserved names or ensure Firstmate's values win. Paseo repeated environment parsing, configuration guaranteebin/backends/paseo.sh:83- Iforigin/HEADis absent or stale, this fallback selects a localmainormasterbranch before checking other refs. The Paseo path skips Firstmate's fresh-base step atfm-spawn.sh:4114-4115; with a stale localmain, a fresh task therefore starts from old code even though Paseo fetches remote refs. Prefer the current remote default ref before falling back to local branches. Paseo worktree base guidancebin/fm-control.sh:427-wait_paseo_statusreturns success for any nonempty status, then relaunch marks the agent confirmed and printsrelaunched. Paseo exposeserrorandclosedstatuses, so a replacement that immediately enterserroris reported as successfully relaunched. Treat failure or closed states as unsuccessful readiness. Paseo lifecycle statusesbin/backends/paseo.sh:122-paseo logsprints a formatted transcript, not JSON; the official logs implementation callsconsole.log, sojqfails on real output. The new capture route atbin/fm-backend.sh:752exposes this to all capture callers, andbin/fm-watch.sh:2725-2732then skips text-based stale detection for Paseo agents. The mock attests/fm-backend-paseo.test.sh:35-37returns JSON and masks the mismatch. Consume the transcript format the CLI actually emits.bin/fm-spawn.sh:2954- This conflicts with the required criterion: “each allowlisted environment value passed directly as its own--env NAME=valuepair.” A valid allowlist containingPASEO_AGENT_IDis silently skipped here; the same invariant is also blocked when a set value contains CR/LF atbin/fm-spawn.sh:2958-2961, which aborts the spawn. The Bash 3.2 forwarding fix round changed the unset check but left these exclusions in place. Confirm whether these values must be forwarded or whether the intent should specify these exceptions.bin/fm-spawn.sh:2944- The Paseo launch arguments omit two established worker environment values. When trace context is enabled,SPAWN_TRACEPARENTis resolved atbin/fm-spawn.sh:4601-4627, after the adapter launch atbin/fm-spawn.sh:2973; its usual export atbin/fm-spawn.sh:4942-4955is inside the Paseo-skipped block beginning atbin/fm-spawn.sh:4798. The changeddocs/trace-context.md:28therefore promises propagation that never reaches the worker.LAVISH_AXI_HOSTis also omitted from the Paseo arguments atbin/fm-spawn.sh:2944-2950; its generic launch export atbin/fm-spawn.sh:4886-4887is skipped too, despite the every-worker contract inAGENTS.md:84. Include both values in Paseo's--envarguments, resolving trace context before launch.🔧 Fix applied.
12 issues (7 errors, 5 warnings) still open:
bin/backends/paseo.sh:108- A Paseo relaunch passes the existing workspace at lines 74–76, but the CLI reportsUsing workspace <id>and its run result has noworkspaceId; neither parser branch here recovers that ID, so line 111 fails after creating the replacement agent.fm-spawn.sh:2973,2983only arms cleanup after this function returns successfully, leaving the new agent untracked while relaunch fails. Use the suppliedworkspace_idwhen reusing a workspace. Paseo run workspace resolution and result shapebin/fm-spawn.sh:1239- After Paseo returns,PASEO_DIRECTstays set until metadata and backlog publication complete (fm-spawn.sh:2983,5165); any earlier failure runs the EXIT cleanup atfm-spawn.sh:1237-1239, which archives the agent and workspace without checking for edits. The brief has already been sent atfm-spawn.sh:2973, and archiving the final workspace reference removes its managed worktree. Conversely, ifpaseo runreturns nonzero after creating the workspace but before creating the agent, this adapter returns at line 105 without capturing or cleaning up that workspace; the CLI creates the workspace before attempting agent creation. The missing policy decision is whether partially started work should be retained/reconciled or discarded; changing that recovery and retention behavior needs authorization. Paseo workspace creation order, workspace archive behaviorbin/fm-spawn.sh:2985- Paseo receivesGOTMPDIR=/tmp/fm-$ID/gotmpatfm-spawn.sh:2949, but thismkdir -preuses a preexisting path without checking for symlinks, ownership, or writable-by-others permissions. A local user can precreate/tmp/fm-$IDas a symlink to a writable directory, causing provider scratch writes to land there. The private-root checks atfm-spawn.sh:4178-4187are skipped by the enclosingBACKEND != paseoguard at line 4118; apply that validation to the Paseo path too.bin/fm-spawn.sh:2956- This contradicts the required criterion: “each allowlisted environment value is passed directly as its own--env NAME=valuepair.” The project supports stock macOS Bash 3.2, but[ -v "$paseo_env_name" ]uses a test operator added in Bash 4.2; under 3.2 the test errors and|| continuesilently skips every allowlisted value. Use a Bash 3.2-compatible unset check. GNU Bash 4.2 release noticebin/fm-spawn.sh:2963- Allowlisted names are appended after the fixed worker values, and Paseo processes repeated--envkeys in order with the last value winning. For example, if the allowlist containsCOMPACT_ADVISER_DISABLEand Firstmate inherits0, the worker receives0despite the documented guarantee that this remains1. The same collision applies toFM_TASK_ID,FIRSTMATE_HOME,FIRSTMATE_STATE,FM_TURNEND, andGOTMPDIRfrom lines 2945–2950. Reject these reserved names or ensure Firstmate's values win. Paseo repeated environment parsing, configuration guaranteebin/backends/paseo.sh:83- Iforigin/HEADis absent or stale, this fallback selects a localmainormasterbranch before checking other refs. The Paseo path skips Firstmate's fresh-base step atfm-spawn.sh:4114-4115; with a stale localmain, a fresh task therefore starts from old code even though Paseo fetches remote refs. Prefer the current remote default ref before falling back to local branches. Paseo worktree base guidancebin/fm-control.sh:427-wait_paseo_statusreturns success for any nonempty status, then relaunch marks the agent confirmed and printsrelaunched. Paseo exposeserrorandclosedstatuses, so a replacement that immediately enterserroris reported as successfully relaunched. Treat failure or closed states as unsuccessful readiness. Paseo lifecycle statusesbin/backends/paseo.sh:122-paseo logsprints a formatted transcript, not JSON; the official logs implementation callsconsole.log, sojqfails on real output. The new capture route atbin/fm-backend.sh:752exposes this to all capture callers, andbin/fm-watch.sh:2725-2732then skips text-based stale detection for Paseo agents. The mock attests/fm-backend-paseo.test.sh:35-37returns JSON and masks the mismatch. Consume the transcript format the CLI actually emits.bin/fm-spawn.sh:2954- This conflicts with the required criterion: “each allowlisted environment value passed directly as its own--env NAME=valuepair.” A valid allowlist containingPASEO_AGENT_IDis silently skipped here; the same invariant is also blocked when a set value contains CR/LF atbin/fm-spawn.sh:2958-2961, which aborts the spawn. The Bash 3.2 forwarding fix round changed the unset check but left these exclusions in place. Confirm whether these values must be forwarded or whether the intent should specify these exceptions.bin/fm-spawn.sh:2944- The Paseo launch arguments omit two established worker environment values. When trace context is enabled,SPAWN_TRACEPARENTis resolved atbin/fm-spawn.sh:4601-4627, after the adapter launch atbin/fm-spawn.sh:2973; its usual export atbin/fm-spawn.sh:4942-4955is inside the Paseo-skipped block beginning atbin/fm-spawn.sh:4798. The changeddocs/trace-context.md:28therefore promises propagation that never reaches the worker.LAVISH_AXI_HOSTis also omitted from the Paseo arguments atbin/fm-spawn.sh:2944-2950; its generic launch export atbin/fm-spawn.sh:4886-4887is skipped too, despite the every-worker contract inAGENTS.md:84. Include both values in Paseo's--envarguments, resolving trace context before launch.bin/fm-spawn.sh:1241- Fix round 6ff6043 introduced a race in the retain-on-dirty cleanup:paseo run --backgroundreturns while the agent keeps running, so this status check can see a clean tree before the agent writes and the archive runs. Archiving the workspace can remove its owned worktree, losing those edits. The same cleanup suppresses archive failures atbin/fm-spawn.sh:1245; the archiver archives the agent and then workspace atbin/backends/paseo.sh:211andbin/backends/paseo.sh:213, leaving no recovery IDs if either operation fails. Quiesce the agent before the final status check, and retain and report both IDs if cleanliness or archive completion cannot be confirmed. Paseo background-run behavior, workspace archive behavior.bin/fm-watch.sh:2730- The new failed-log fallback callswindow_is_busyand discards its result, so it changes no busy or stale state; the normal capture path already classifies Paseo status. The added assertion attests/fm-watch-triage.test.sh:6045makes this extra read-onlyinspectcall a requirement. No stated intent requires this discarded poll; remove the fallback and its assertion.🔧 Fix applied.
13 issues (8 errors, 5 warnings) still open:
bin/backends/paseo.sh:108- A Paseo relaunch passes the existing workspace at lines 74–76, but the CLI reportsUsing workspace <id>and its run result has noworkspaceId; neither parser branch here recovers that ID, so line 111 fails after creating the replacement agent.fm-spawn.sh:2973,2983only arms cleanup after this function returns successfully, leaving the new agent untracked while relaunch fails. Use the suppliedworkspace_idwhen reusing a workspace. Paseo run workspace resolution and result shapebin/fm-spawn.sh:1239- After Paseo returns,PASEO_DIRECTstays set until metadata and backlog publication complete (fm-spawn.sh:2983,5165); any earlier failure runs the EXIT cleanup atfm-spawn.sh:1237-1239, which archives the agent and workspace without checking for edits. The brief has already been sent atfm-spawn.sh:2973, and archiving the final workspace reference removes its managed worktree. Conversely, ifpaseo runreturns nonzero after creating the workspace but before creating the agent, this adapter returns at line 105 without capturing or cleaning up that workspace; the CLI creates the workspace before attempting agent creation. The missing policy decision is whether partially started work should be retained/reconciled or discarded; changing that recovery and retention behavior needs authorization. Paseo workspace creation order, workspace archive behaviorbin/fm-spawn.sh:2985- Paseo receivesGOTMPDIR=/tmp/fm-$ID/gotmpatfm-spawn.sh:2949, but thismkdir -preuses a preexisting path without checking for symlinks, ownership, or writable-by-others permissions. A local user can precreate/tmp/fm-$IDas a symlink to a writable directory, causing provider scratch writes to land there. The private-root checks atfm-spawn.sh:4178-4187are skipped by the enclosingBACKEND != paseoguard at line 4118; apply that validation to the Paseo path too.bin/fm-spawn.sh:2956- This contradicts the required criterion: “each allowlisted environment value is passed directly as its own--env NAME=valuepair.” The project supports stock macOS Bash 3.2, but[ -v "$paseo_env_name" ]uses a test operator added in Bash 4.2; under 3.2 the test errors and|| continuesilently skips every allowlisted value. Use a Bash 3.2-compatible unset check. GNU Bash 4.2 release noticebin/fm-spawn.sh:2963- Allowlisted names are appended after the fixed worker values, and Paseo processes repeated--envkeys in order with the last value winning. For example, if the allowlist containsCOMPACT_ADVISER_DISABLEand Firstmate inherits0, the worker receives0despite the documented guarantee that this remains1. The same collision applies toFM_TASK_ID,FIRSTMATE_HOME,FIRSTMATE_STATE,FM_TURNEND, andGOTMPDIRfrom lines 2945–2950. Reject these reserved names or ensure Firstmate's values win. Paseo repeated environment parsing, configuration guaranteebin/backends/paseo.sh:83- Iforigin/HEADis absent or stale, this fallback selects a localmainormasterbranch before checking other refs. The Paseo path skips Firstmate's fresh-base step atfm-spawn.sh:4114-4115; with a stale localmain, a fresh task therefore starts from old code even though Paseo fetches remote refs. Prefer the current remote default ref before falling back to local branches. Paseo worktree base guidancebin/fm-control.sh:427-wait_paseo_statusreturns success for any nonempty status, then relaunch marks the agent confirmed and printsrelaunched. Paseo exposeserrorandclosedstatuses, so a replacement that immediately enterserroris reported as successfully relaunched. Treat failure or closed states as unsuccessful readiness. Paseo lifecycle statusesbin/backends/paseo.sh:122-paseo logsprints a formatted transcript, not JSON; the official logs implementation callsconsole.log, sojqfails on real output. The new capture route atbin/fm-backend.sh:752exposes this to all capture callers, andbin/fm-watch.sh:2725-2732then skips text-based stale detection for Paseo agents. The mock attests/fm-backend-paseo.test.sh:35-37returns JSON and masks the mismatch. Consume the transcript format the CLI actually emits.bin/fm-spawn.sh:2954- This conflicts with the required criterion: “each allowlisted environment value passed directly as its own--env NAME=valuepair.” A valid allowlist containingPASEO_AGENT_IDis silently skipped here; the same invariant is also blocked when a set value contains CR/LF atbin/fm-spawn.sh:2958-2961, which aborts the spawn. The Bash 3.2 forwarding fix round changed the unset check but left these exclusions in place. Confirm whether these values must be forwarded or whether the intent should specify these exceptions.bin/fm-spawn.sh:2944- The Paseo launch arguments omit two established worker environment values. When trace context is enabled,SPAWN_TRACEPARENTis resolved atbin/fm-spawn.sh:4601-4627, after the adapter launch atbin/fm-spawn.sh:2973; its usual export atbin/fm-spawn.sh:4942-4955is inside the Paseo-skipped block beginning atbin/fm-spawn.sh:4798. The changeddocs/trace-context.md:28therefore promises propagation that never reaches the worker.LAVISH_AXI_HOSTis also omitted from the Paseo arguments atbin/fm-spawn.sh:2944-2950; its generic launch export atbin/fm-spawn.sh:4886-4887is skipped too, despite the every-worker contract inAGENTS.md:84. Include both values in Paseo's--envarguments, resolving trace context before launch.bin/fm-spawn.sh:1241- Fix round 6ff6043 introduced a race in the retain-on-dirty cleanup:paseo run --backgroundreturns while the agent keeps running, so this status check can see a clean tree before the agent writes and the archive runs. Archiving the workspace can remove its owned worktree, losing those edits. The same cleanup suppresses archive failures atbin/fm-spawn.sh:1245; the archiver archives the agent and then workspace atbin/backends/paseo.sh:211andbin/backends/paseo.sh:213, leaving no recovery IDs if either operation fails. Quiesce the agent before the final status check, and retain and report both IDs if cleanliness or archive completion cannot be confirmed. Paseo background-run behavior, workspace archive behavior.bin/fm-spawn.sh:1243- Round 8c9e248 made abort cleanup stop the agent before checking the worktree, but this Git status check still treats ignored files as clean. For example, a Paseo worktree setup hook can copy an ignored.env; if a later spawn step fails, cleanup can archive the workspace and remove that file. The same gap reaches normal Paseo teardown:bin/fm-teardown.sh:1791checks status, then its new archive route atbin/fm-teardown.sh:3575reachesbin/backends/paseo.sh:213. Paseo’s worktree guide documents both setup hooks that copy.envand removal of the worktree when its last workspace is archived. Please decide whether ignored setup/user files may be discarded on these paths; if not, both cleanup gates need to retain and report them.bin/fm-spawn.sh:2964- The f00c5d3 environment-forwarding round addedGOTMPDIR=/tmp/fm-$ID/gotmphere, but Firstmate creates that directory only afterpaseo runreturns atbin/fm-spawn.sh:3000. Paseo runs this command with--background, which returns while the worker continues; a worker that invokes Go before the directory is created can fail because Go does not createGOTMPDIR. Create the directory before launching the worker.🔧 Fix applied.
16 issues (8 errors, 8 warnings) still open:
bin/backends/paseo.sh:108- A Paseo relaunch passes the existing workspace at lines 74–76, but the CLI reportsUsing workspace <id>and its run result has noworkspaceId; neither parser branch here recovers that ID, so line 111 fails after creating the replacement agent.fm-spawn.sh:2973,2983only arms cleanup after this function returns successfully, leaving the new agent untracked while relaunch fails. Use the suppliedworkspace_idwhen reusing a workspace. Paseo run workspace resolution and result shapebin/fm-spawn.sh:1239- After Paseo returns,PASEO_DIRECTstays set until metadata and backlog publication complete (fm-spawn.sh:2983,5165); any earlier failure runs the EXIT cleanup atfm-spawn.sh:1237-1239, which archives the agent and workspace without checking for edits. The brief has already been sent atfm-spawn.sh:2973, and archiving the final workspace reference removes its managed worktree. Conversely, ifpaseo runreturns nonzero after creating the workspace but before creating the agent, this adapter returns at line 105 without capturing or cleaning up that workspace; the CLI creates the workspace before attempting agent creation. The missing policy decision is whether partially started work should be retained/reconciled or discarded; changing that recovery and retention behavior needs authorization. Paseo workspace creation order, workspace archive behaviorbin/fm-spawn.sh:2985- Paseo receivesGOTMPDIR=/tmp/fm-$ID/gotmpatfm-spawn.sh:2949, but thismkdir -preuses a preexisting path without checking for symlinks, ownership, or writable-by-others permissions. A local user can precreate/tmp/fm-$IDas a symlink to a writable directory, causing provider scratch writes to land there. The private-root checks atfm-spawn.sh:4178-4187are skipped by the enclosingBACKEND != paseoguard at line 4118; apply that validation to the Paseo path too.bin/fm-spawn.sh:2956- This contradicts the required criterion: “each allowlisted environment value is passed directly as its own--env NAME=valuepair.” The project supports stock macOS Bash 3.2, but[ -v "$paseo_env_name" ]uses a test operator added in Bash 4.2; under 3.2 the test errors and|| continuesilently skips every allowlisted value. Use a Bash 3.2-compatible unset check. GNU Bash 4.2 release noticebin/fm-spawn.sh:2963- Allowlisted names are appended after the fixed worker values, and Paseo processes repeated--envkeys in order with the last value winning. For example, if the allowlist containsCOMPACT_ADVISER_DISABLEand Firstmate inherits0, the worker receives0despite the documented guarantee that this remains1. The same collision applies toFM_TASK_ID,FIRSTMATE_HOME,FIRSTMATE_STATE,FM_TURNEND, andGOTMPDIRfrom lines 2945–2950. Reject these reserved names or ensure Firstmate's values win. Paseo repeated environment parsing, configuration guaranteebin/backends/paseo.sh:83- Iforigin/HEADis absent or stale, this fallback selects a localmainormasterbranch before checking other refs. The Paseo path skips Firstmate's fresh-base step atfm-spawn.sh:4114-4115; with a stale localmain, a fresh task therefore starts from old code even though Paseo fetches remote refs. Prefer the current remote default ref before falling back to local branches. Paseo worktree base guidancebin/fm-control.sh:427-wait_paseo_statusreturns success for any nonempty status, then relaunch marks the agent confirmed and printsrelaunched. Paseo exposeserrorandclosedstatuses, so a replacement that immediately enterserroris reported as successfully relaunched. Treat failure or closed states as unsuccessful readiness. Paseo lifecycle statusesbin/backends/paseo.sh:122-paseo logsprints a formatted transcript, not JSON; the official logs implementation callsconsole.log, sojqfails on real output. The new capture route atbin/fm-backend.sh:752exposes this to all capture callers, andbin/fm-watch.sh:2725-2732then skips text-based stale detection for Paseo agents. The mock attests/fm-backend-paseo.test.sh:35-37returns JSON and masks the mismatch. Consume the transcript format the CLI actually emits.bin/fm-spawn.sh:2954- This conflicts with the required criterion: “each allowlisted environment value passed directly as its own--env NAME=valuepair.” A valid allowlist containingPASEO_AGENT_IDis silently skipped here; the same invariant is also blocked when a set value contains CR/LF atbin/fm-spawn.sh:2958-2961, which aborts the spawn. The Bash 3.2 forwarding fix round changed the unset check but left these exclusions in place. Confirm whether these values must be forwarded or whether the intent should specify these exceptions.bin/fm-spawn.sh:2944- The Paseo launch arguments omit two established worker environment values. When trace context is enabled,SPAWN_TRACEPARENTis resolved atbin/fm-spawn.sh:4601-4627, after the adapter launch atbin/fm-spawn.sh:2973; its usual export atbin/fm-spawn.sh:4942-4955is inside the Paseo-skipped block beginning atbin/fm-spawn.sh:4798. The changeddocs/trace-context.md:28therefore promises propagation that never reaches the worker.LAVISH_AXI_HOSTis also omitted from the Paseo arguments atbin/fm-spawn.sh:2944-2950; its generic launch export atbin/fm-spawn.sh:4886-4887is skipped too, despite the every-worker contract inAGENTS.md:84. Include both values in Paseo's--envarguments, resolving trace context before launch.bin/fm-spawn.sh:1241- Fix round 6ff6043 introduced a race in the retain-on-dirty cleanup:paseo run --backgroundreturns while the agent keeps running, so this status check can see a clean tree before the agent writes and the archive runs. Archiving the workspace can remove its owned worktree, losing those edits. The same cleanup suppresses archive failures atbin/fm-spawn.sh:1245; the archiver archives the agent and then workspace atbin/backends/paseo.sh:211andbin/backends/paseo.sh:213, leaving no recovery IDs if either operation fails. Quiesce the agent before the final status check, and retain and report both IDs if cleanliness or archive completion cannot be confirmed. Paseo background-run behavior, workspace archive behavior.bin/fm-spawn.sh:1243- Round 8c9e248 made abort cleanup stop the agent before checking the worktree, but this Git status check still treats ignored files as clean. For example, a Paseo worktree setup hook can copy an ignored.env; if a later spawn step fails, cleanup can archive the workspace and remove that file. The same gap reaches normal Paseo teardown:bin/fm-teardown.sh:1791checks status, then its new archive route atbin/fm-teardown.sh:3575reachesbin/backends/paseo.sh:213. Paseo’s worktree guide documents both setup hooks that copy.envand removal of the worktree when its last workspace is archived. Please decide whether ignored setup/user files may be discarded on these paths; if not, both cleanup gates need to retain and report them.bin/fm-spawn.sh:2964- The f00c5d3 environment-forwarding round addedGOTMPDIR=/tmp/fm-$ID/gotmphere, but Firstmate creates that directory only afterpaseo runreturns atbin/fm-spawn.sh:3000. Paseo runs this command with--background, which returns while the worker continues; a worker that invokes Go before the directory is created can fail because Go does not createGOTMPDIR. Create the directory before launching the worker.bin/backends/paseo.sh:211-fm_backend_paseo_killarchives the agent before the workspace. If workspace archiving fails, teardown retains the task record, but retry attempts to archive the agent again; Paseo’s CLI rejects already archived agents (source), so the workspace archive is never retried. The same sequence is used by spawn abort cleanup atbin/fm-spawn.sh:1247; the shared agent-archive helper is also used by the exit fallback atbin/fm-control.sh:553. Make the shared archive step idempotent for already archived agents.bin/fm-spawn.sh:1239- Fix round8c9e248added this stop-proof gate to abort cleanup. Paseostopcancels a running turn; its normal post-turn state is idle (CLI, lifecycle). The shared proof explicitly treatsidleas failure atbin/backends/paseo.sh:170, so after a successful background launch followed by a setup failure, cleanup skips even the Git check and leaves a clean agent/workspace for manual reconciliation. Add an abort-specific quiescence check that accepts idle after a successful stop before checking Git and archiving; retain the stricter exit behavior atbin/fm-control.sh:550-553.bin/fm-control-lib.sh:70- Thehandoffcomponent pins a new, user-visible lifecycle command to taskpaseo-backend-adapter, its former tmux endpoint, and its old branch, then creates a replacement tmux session (bin/fm-control.sh:10,1092;bin/fm-spawn.sh:3349). The accepted intent calls for rebuilding on a fresh branch with a Herdr worker and adding the Paseo adapter; it does not require this task-specific tmux recovery path. Under the simplification requirement, remove this unrequired component. Removing the added control behavior needs user authorization.--envarguments, with Paseo-owned values excluded and host process-list visibility documented., Launch Codex and OpenCode crewmates; Codex receives no forced auto-review mode while OpenCode retains build mode., Check, message, interrupt, and tear down a Paseo crewmate; Firstmate routes operations using the recorded agent and workspace identities.--envarguments, with Paseo-owned values excluded and host process-list visibility documented.tests/fm-backend-paseo.test.shbash tests/fm-spawn-paseo-env.test.shpaseo --version; paseo daemon statuspaseo provider ls --jsonpaseo --help; paseo daemon --help; paseo run --help`rg -n -C 3 'Paseo|launch.env|process listings|--env' docs/configuration.md🔧 Fix applied.
1 warning still open:
--envand Codex receives no forced auto-review mode., Spawn an OpenCode crewmate through Paseo; it starts with build mode., Inspect, message, interrupt, and tear down a Paseo crewmate; Firstmate routes by its recorded agent and workspace IDs and confirms archival., Abort a spawn after Paseo creates a worktree containing an ignored.env; Firstmate retains it and reports both IDs and the reason.--envand Codex receives no forced auto-review mode..env; Firstmate retains it and reports both IDs and the reason.paseo --versionpaseo daemon statusLive adapter preflight:. bin/fm-backend.sh; fm_backend_source paseo; fm_backend_paseo_runtime_checktests/fm-backend-paseo.test.shbash tests/fm-spawn-paseo-env.test.shtests/fm-control.test.shgit diff fc409dd1b1c93c59e542367f9892ae62d41ae573..e9659c33c7e30b244f4c5698c150c1fc56443277 -- docs/paseo-backend.md docs/configuration.md docs/herdr-backend.mdgit status --short && git ls-files --others --exclude-standard✅ **Document** - passed
✅ No issues found.
🔧 **Lint** - 1 issue found → auto-fixed ✅
🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ **Push** - passed
✅ No issues found.