ai

[OpenCode Field Notes Part 5] DCP context optimization and daily operating routine

#opencode #dcp #context #remote

1. Before and after DCP

As described in Part 1, the biggest fatigue source was this: as sessions got longer, past context started interfering with current work.

In long sessions, context management became cost management. When context grew unnecessarily, both response speed and token efficiency dropped.

After introducing DCP-style context control, my working loop stayed noticeably lighter and more stable.

2. My DCP operating rules

  1. Aggressively remove context not directly related to the current task
  2. Keep only short, high-signal context for continuity
  3. Check context state periodically in long sessions

Even this simple discipline reduced wasted tokens and cut repeated explanations.

3. Real @tarquinen/opencode-dcp setup

I used @tarquinen/opencode-dcp and started from minimal configuration, not from a heavy preset.

3-1) Plugin registration (~/.config/opencode/opencode.json)

In my environment, I added @tarquinen/opencode-dcp to the plugin array in global ~/.config/opencode/opencode.json.

{
  "plugin": [
    "opencode-antigravity-auth@latest",
    "opencode-anthropic-auth",
    "opencode-cursor-auth",
    "@tarquinen/opencode-dcp",
    "oh-my-opencode-slim"
  ]
}

Restart OpenCode after saving.

3-2) DCP config location

I use ~/.config/opencode/dcp.jsonc.

3-3) Real values I used (~/.config/opencode/dcp.jsonc)

{
  "$schema": "https://raw.githubusercontent.com/Opencode-DCP/opencode-dynamic-context-pruning/master/dcp.schema.json",
  "turnProtection": { "enabled": true, "turns": 4 }
}

The key is turnProtection. I protect the latest 4 turns from over-pruning, while letting DCP clean the rest according to flow.

3-4) /dcp commands I used most

  • /dcp context: check current token usage/savings
  • /dcp sweep: clean recent tool outputs in batch
  • /dcp distill: preserve essential context in condensed form
  • /dcp manual on: pause auto-cleaning during critical debugging

When the session feels heavy, I check context first, then run sweep or distill if needed.

3-5) Caveats

  • DCP may trade off against prompt-cache hit rate
  • Some constraints apply for sub-agent contexts
  • Restarting OpenCode after config updates is safer

4. Android remote workflow will be a separate post

Android + tmux remote flow has been very useful in practice, but it deserves a dedicated write-up.

To keep this post focused on DCP, I will cover remote setup, connection routine, and practical tips in a separate article.

5. Example daily routine

  • Morning: structure review and task decomposition
  • Afternoon: parallel implementation and checks
  • Wrap-up: test, cleanup, and documentation

The core is maintaining an uninterrupted loop. Once this routine settles, both output quality and fatigue improve.

In that sense, DCP is not just an optimization feature. It is a practical mechanism that reduces repeated explanation and manual handoff work.

6. Closing this series

For me, OpenCode was not just another tool. It became a baseline for turning vibe-coding into a sustainable engineering routine.

In the next series, I plan to focus on OpenClaw, and show how API capabilities from multiple services can be used far beyond coding support, toward practical AI assistance in daily work and life.

Sources

💬 댓글

이 글에 대한 의견을 남겨주세요