Skip to content

Append custom task instructions in Pi executor#80

Merged
glittercowboy merged 1 commit intomainfrom
codex/custom-instructions-daemon
Apr 28, 2026
Merged

Append custom task instructions in Pi executor#80
glittercowboy merged 1 commit intomainfrom
codex/custom-instructions-daemon

Conversation

@glittercowboy
Copy link
Copy Markdown
Contributor

@glittercowboy glittercowboy commented Apr 28, 2026

Summary

  • Bumps protocol-go to v0.23.0.
  • Carries Task.customInstructions through the session actor.
  • Passes non-empty task instructions to Pi with --append-system-prompt.
  • Adds focused executor and actor coverage.

Dependency order

  1. Add task custom instructions to protocol protocol-go#29 merged and tagged v0.23.0.
  2. Merge this daemon PR.
  3. Merge the cloud app PR after relay also consumes v0.23.0.

Verification

  • go test ./...
  • go build -o gsd-cloud .

Summary by CodeRabbit

  • New Features

    • Added support for custom instructions, enabling users to append additional guidance to configure how tasks are executed.
  • Tests

    • Added tests to verify custom instructions are correctly integrated and propagated through the system.
  • Chores

    • Upgraded protocol dependency to v0.23.0.
    • Added spikes directory to .gitignore.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: fa316786-dd10-489a-a70e-2b2c910ae09a

📥 Commits

Reviewing files that changed from the base of the PR and between 7078d8f and aad9a7b.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (6)
  • .gitignore
  • go.mod
  • internal/pi/executor.go
  • internal/pi/executor_test.go
  • internal/session/actor.go
  • internal/session/actor_test.go

📝 Walkthrough

Walkthrough

Custom instructions support is added to the PI execution pipeline. A new CustomInstructions field is introduced to the executor options and task context, threading through the protocol layer to the pi subprocess via the --append-system-prompt argument. Dependencies are bumped and comprehensive tests validate the propagation chain.

Changes

Cohort / File(s) Summary
Git Configuration
.gitignore
Adds ignore pattern for spikes/ directory to prevent tracking of spike experiment files.
Dependencies
go.mod
Upgrades github.com/gsd-build/protocol-go from v0.22.0 to v0.23.0.
PI Executor Layer
internal/pi/executor.go, internal/pi/executor_test.go
Adds CustomInstructions field to executor Options struct. When non-empty (after trimming), the field is passed to the pi subprocess via --append-system-prompt flag. Startup logging includes custom instructions length. Test validates argument propagation through fake pi binary.
Task Execution Layer
internal/session/actor.go, internal/session/actor_test.go
Introduces CustomInstructions field in taskContext, populated from protocol.Task.CustomInstructions in executeTask, and forwarded to pi executor via CustomInstructions option in runPiExecutor. Test verifies the flag value is correctly written to captured args file.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 A whispered instruction, so custom and bright,
Through layers of code, it takes flight!
From protocol down to the pi subprocess call,
These instructions now echo through all!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Append custom task instructions in Pi executor' accurately and specifically describes the main change: adding support for custom task instructions that are appended to the Pi executor via the system prompt.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/custom-instructions-daemon

Comment @coderabbitai help to get the list of available commands and usage tips.

@glittercowboy glittercowboy merged commit 416f674 into main Apr 28, 2026
2 checks passed
@glittercowboy glittercowboy deleted the codex/custom-instructions-daemon branch April 28, 2026 17:00
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