hashpress-opencode
v0.2.3
Published
OpenCode plugin: Transponder/hashpress-style structured compaction handoff with OpenCode anchored previous-summary merge. Does not set the compaction model.
Downloads
0
Maintainers
Readme
hashpress-opencode
OpenCode plugin that replaces the default compaction user prompt with a structured continuation handoff:
- OpenCode anchored merge — re-injects
<previous-summary>on repeated compacts - Transponder / hashpress ledgers — Pickup State, Artifact Trail, Rules, Plans, Promises, decisions+why, verbatim literals
- Tail-evidence digest — OpenCode's summarizer only sees the session head; the newest turns are excluded from its input. The plugin digests those excluded turns into a bounded
<recent-evidence>block marked authoritative for status, so a ship/release that happened in the tail flips blocked→done instead of going stale.
Does not set or override agent.compaction.model. Configure the compaction model in opencode.json as usual.
Before request lowering, the plugin also repairs malformed cross-provider tool-call IDs that contain a valid OpenAI Responses �fc_...� ID but exceed its 64-character �call_id� limit. It changes only OpenCode's cloned request history, not persisted session messages; unknown ID formats are left untouched.
Install
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["hashpress-opencode"],
"agent": {
"compaction": {
"model": "your/preferred-compaction-model"
}
}
}OpenCode installs npm plugins automatically on startup.
Options
{
"plugin": [
[
"hashpress-opencode",
{
"extraContext": ["## Swarm\n- preserve bead IDs"],
"disabled": false
}
]
]
}| Option | Default | Meaning |
|--------|---------|---------|
| disabled | false | Skip prompt replacement |
| extraContext | [] | Extra strings appended after the template (merged with other plugins' output.context) |
Local / file URL (dev)
{
"plugin": ["file:///Users/you/__devlocal/hashpress-opencode/dist/index.js"]
}bun install
bun run buildWhat it changes
Hooks experimental.session.compacting and sets output.prompt to a markdown checklist the compaction agent must fill:
- Objective
- Pickup State (cwd, branch, task, next command, active files, tests, caveats)
- Important Details (constraints, decisions and why, exact literals)
- Artifact Trail (created / modified / examined)
- Rules and Invariants
- Plans and Task State
- Promises
- Work State (completed / active / blocked / ruled out)
- User Messages
- Next Move
On later compacts, the plugin loads the last finished compaction summary via client.session.messages and wraps it in <previous-summary> so the model merges instead of rewriting from scratch.
What it does not do
- Does not pick a summarizer model (use
agent.compaction.model) - Does not force JSON-schema tool output (OpenCode's hook only replaces prompt text)
- Does not rehydrate verbatim transcript spans (that needs Transponder's bridge pipeline)
Develop
bun install
bun test
bun run buildLicense
MIT
