Skip to content

Add start flags, skip-install optimization, and pier patch-harbor - #1

Open
mikerjacobi wants to merge 8 commits into
mainfrom
mike/various-flags
Open

Add start flags, skip-install optimization, and pier patch-harbor#1
mikerjacobi wants to merge 8 commits into
mainfrom
mike/various-flags

Conversation

@mikerjacobi

@mikerjacobi mikerjacobi commented Mar 19, 2026

Copy link
Copy Markdown

Summary

  • --ae / --agent-env and --ee / --environment-env on pier start: agent/session env (persisted, forwarded on pier exec) vs compose service env at container start.
  • --delete: stop container, remove workspace tree and session, then start fresh.
  • --exec on pier start: run a command in the container immediately after start.
  • --all on pier stop: stop all active container-mode workspaces.
  • Skip-install optimization: probe the container for the agent binary before installing. If already present (baked into the Docker image), skip the ~5 min install step and run only interactive setup (onboarding, skills, MCP).
  • pier patch-harbor: new CLI command that applies idempotent patches to harbor's installed source across all uv tool venvs:
    • trial-chown: fix agent log permissions so trajectory extraction works before harbor's cleanup
    • skip-install: add early-exit guard to agent install methods when the binary is already in the image

Test plan

  • olmoearth-harbor.sh debug/togo — reward 0.709, 0 errors
  • shippy-harbor.sh what-is-skylight — reward 0.300, 0 errors
  • olmoearth-pier.sh debug/togo — completed in ~2 min, 0 errors
  • shippy-pier.sh what-is-skylight — completed in 84s, 0 errors
  • pier patch-harbor idempotent (second run reports "already applied")
  • Skip-install confirmed: "claude-code already installed, skipping install step..."
  • Existing unit tests pass

@mikerjacobi mikerjacobi changed the title added various flags to start and stop Add --force, --exec, --ae/--ee flags to start; --all to stop; robust fallback on stop Mar 19, 2026

@jbragg jbragg left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

see readme suggestions & ci test failure

Comment thread README.md Outdated
- `--agent` installs a coding agent. Can be called multiple times to install multiple agents. When `task_path` is omitted, operates on the current workspace.
- `-f` / `--force` tears down any existing workspace or container at the target directory before starting fresh.
- `--ae` / `--agent-env` passes an environment variable to the agent inside the container (`KEY=VALUE`). Repeatable. These are persisted in the session and forwarded by `pier exec`.
- `--ee` / `--environment-env` passes an environment variable into the container environment at startup (`KEY=VALUE`). Repeatable.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Example when to use this instead of --ae would be nice

Comment thread README.md Outdated
- `-d` specifies the workspace directory. Required for local tasks; defaults to `./<task-name>` for remote tasks.
- `--host` skips the container (workspace only).
- `--agent` installs a coding agent. Can be called multiple times to install multiple agents. When `task_path` is omitted, operates on the current workspace.
- `-f` / `--force` tears down any existing workspace or container at the target directory before starting fresh.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What do you think about --delete or --clean to be more explicit that the workspace dir will be deleted?

…s in README

- --force only allows non-empty dirs; --delete tears down existing session at -d
- README: when to use --ee (compose startup) vs -e/--env-file/--ae (pier exec)
- Rename test to test_start_delete_tears_down_existing

Made-with: Cursor
… env forwarding

- Remove -f/--force; non-empty workspace dirs now warn instead of error
- --exec prints a message on non-zero exit before propagating the code
- _start_task_free forwards agent_env/environment_env when installing
  agents into an already-running container

Made-with: Cursor
- Add `pier/patches/` package with two idempotent harbor patches:
  - trial-chown: fix agent log permissions for trajectory extraction
  - skip-install: skip agent install when binary is already in the image
- Add `pier patch-harbor` CLI command that discovers and patches harbor
  across all uv tool venvs (both standalone harbor and pier's copy)
- Add `_is_agent_installed()` probe so pier start skips redundant agent
  setup when the binary is already present in the container (~5min saved)
- Add `skip_install` flag to `setup_agent()` / harbor_bridge to run only
  interactive setup (onboarding, skills, MCP) without the install step

Made-with: Cursor
@mikerjacobi mikerjacobi changed the title Add --force, --exec, --ae/--ee flags to start; --all to stop; robust fallback on stop Add start flags, skip-install optimization, and pier patch-harbor Apr 9, 2026
@jbragg
jbragg force-pushed the main branch 2 times, most recently from 516b19e to 27ef61b Compare July 8, 2026 06:01
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.

2 participants