Handoff · Scratchpad · Token Burning: Managing Context in Long AI Tasks

About 5 mindeveloper-tools
#Handoff#Scratchpad#Token Burning#Detached HEAD#Upstream#.gitignore#AI Coding Tools#Glossary
※ Editorial Principle: The work scenarios and characters below are hypothetical scenarios designed to help understand the terminology. They do not represent the actual experiences of the author or events at any specific company.
Let's assume a situation where you need to hand over an ongoing AI development task to another team member before taking a three-week vacation.
After searching, I found an expression that fits this situation perfectly.

Handoff: Accurately handing over the situation to the next person before leaving

markdown
1# Handoff Document
2- Progress: Payment module 80% complete
3- Remaining Tasks: Refund API integration
4- Blockers: Waiting for response on external documentation
It was the act of summarizing and handing over what has been done, what is left, and where things are blocked so that the next person doesn't have to wander from the beginning. It's similar to passing a baton in a relay race—not just throwing it, but letting go only after confirming the other person has a firm grip.
A structure where progress and blockers are documented for the next person to take over seamlessly
A structure where progress and blockers are documented for the next person to take over seamlessly
While organizing the document, a temporary memo file left by the agent during its work caught my eye. When I opened it again, it was written more thoroughly than I expected.

Scratchpad: A memo file that remains even though it is not official documentation

text
1scratchpad.md
2- External API response format differs from documentation (actually an array)
3- Test account password is in Slack #payment-dev
Rereading this file, which wouldn't make it into the official commit, I realized that the most practical information was actually all written here. It was a temporary note where miscellaneous memos, too burdensome to refine into official documentation, were casually scribbled down for future reference. It was like a scribble on your palm during a meeting—informal, but packed with immediately useful information. I left a link to this file in the handoff document as well.
A temporary note casually left before refining it into official documentation
A temporary note casually left before refining it into official documentation
Lastly, as I was about to hand over a large task to the agent, a colleague warned me in advance in the team channel.

Token Burning: Why you shouldn't pile up large tasks right before going on vacation

My colleague told me, 'If you assign the whole thing right now, it might burn through the entire limit while you're on vacation.'
text
1This month's usage: ▓▓▓▓▓▓▓░░░ 72%
The longer the conversation and the more complex the task, the more context has to be processed, thereby consuming the set limit that much faster. It's like how driving style affects fuel consumption, even for the same destination. I decided to break down the large task and rescheduled it.
How the set limit is consumed faster as the task grows larger
How the set limit is consumed faster as the task grows larger
While rescheduling, I opened a branch I had created in the past for testing, and a strange warning popped up.

Detached HEAD: When the branch name disappears and only the commit number is shown

text
1You are in 'detached HEAD' state at a1b2c3d
Looking at the official documentation, it explained that this state occurs when you directly check out a specific commit rather than a branch name.
Because it is tied to a specific point without belonging to any branch, if you build more commits here, those records are likely to drift away and be forgotten unless you create a branch later. It was like being temporarily tied to a buoy rather than a ship with a name tag, so I quickly created a new branch and moved them over.
A state of being tied to a specific commit point without a branch name
A state of being tied to a specific commit point without a branch name
A close-up of a hand pausing briefly after seeing the terminal warning message
While cleaning up this branch and checking the remote repository settings again, a remote name configured by a former colleague caught my eye.

Upstream: When you need to continuously refer to the original repository

bash
1$ git remote -v
2origin (my fork)
3upstream (original repository)
While looking at the remote repository list that my colleague had set up when they previously forked and used this open-source library, I got curious and looked it up.
It was a name pointing to the actual original repository, rather than the repository I cloned and used. Whenever the original author released a new version, I could pull the latest updates to my side through this path. The term referring to the flow of water coming from upstream was used literally for the repository name.
A stream-like path pulling the latest updates from the original repository
A stream-like path pulling the latest updates from the original repository
Finally, while checking the status before committing, a log file that kept showing up in git status bothered me.

.gitignore: When files you don't want to commit keep trailing along

bash
1$ git status
2Untracked files:
3 debug.log
4 node_modules/
I had ignored these files every time, but this time I looked for a way to hide them completely. Once I wrote down the list in a file as the tool instructed, they didn't show up again.
It was a file where you list in advance the files or folders you want to completely exclude from commits. It was similar to telling a cleaning service in advance, 'Do not touch this room.' With this, organizing the handoff document was complete.
A list for writing down in advance the files and folders to be completely excluded from commits
A list for writing down in advance the files and folders to be completely excluded from commits
The back of a developer leaving the office, pulling a suitcase, with a clean desk left behind
I finally closed the handoff document right before leaving work. Realizing that the person reading this document three weeks later might not be a teammate but myself, I rewrote the last paragraph not as a note for someone else, but as a letter to my future self upon returning.

Frequently Asked Questions

How detailed should a handoff document be?

The standard is whether the recipient can take over immediately without needing background explanations. In particular, blockers and their reasons should be documented in detail to avoid repeating the same trial and error.

If I accidentally commit in a detached HEAD state, does everything disappear?

They don't disappear immediately and often remain in the system for a while, meaning there is usually a way to recover them. However, they may be cleaned up over time, so it is safer to create a branch and move them as soon as you notice.

If I add an already committed file to .gitignore later, does it disappear immediately?

No. For files that are already being tracked, you must run a separate command to untrack them. The .gitignore file only applies to newly added files going forward.

This is Episode 11 of the <a href="/glossary/code-generation" class="glossary-link" title="A technology in which AI automatically writes programming code based on natural language descriptions or the context of existing code.">AI Coding</a> Tool Glossary series. Next Episode Preview · Episode 12: Preparing for an integrated release across multiple repositories (Orchestrator vs Worker · Delegate · MCP · Fork · Release Tag · Submodule)

References

Related posts